Grokbase
x

Adam Ruth (a...@intercation.com)

Profile | Posts (32)

User Information

Display Name:Adam Ruth
Partial Email Address:a...@intercation.com
Posts:
32 total
2 in PostgreSQL - Admin
3 in PostgreSQL - Advocacy
23 in PostgreSQL - General
2 in PostgreSQL - Performance
4 in PostgreSQL - SQL

5 Most Recent

All Posts
1) Adam Ruth Re: Postgresql feature
| +1 vote
Amen to that. I have to use Oracle at work, but I use PostgreSQL for all my side stuff. Man do I...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Amen to that.  I have to use Oracle at work, but I use PostgreSQL for 
all my side stuff. Man do I ever miss psql when I'm in SQL*Plus...


On Aug 18, 2004, at 12:29 PM, Andrew Rawnsley wrote:

>
> If you use it enough, I think it is inevitable that something,
> sometime, somewhere will really honk you
> off about Oracle. With the feature bloat they're into these days, very
> likely it will be something
> you care nothing about that does it, too.
>
> On Aug 18, 2004, at 2:08 PM, Ben wrote:
>
>> Is it just me, or has there been a rash of "I'm thinking about
>> postgres
>> and coming from an oracle background" questions recently? Was there
>> some
>> writeup of postgres in a db rag in the last month or so?
>>
>> On Wed, 18 Aug 2004, John Sidney-Woollett wrote:
>>
>>> Bit more info (from my own findings migrating from Oracle ->
>>> Postgres)
>>>
>>> Sequences - YES
>>> Packages - NO (concept doesn't exist in PG)
>>> Functions - YES, Procedures - NO (also no INOUT or OUT parameters)
>>> Full-text - YES, tSearch2
>>> Triggers - YES
>>> Jobs - NO, (but scheduled tasks can be implemented in other ways)
>>> Synonyms - NO (can be frigged using search_paths and schemas)
>>> Replication - more than one option depending on requirement
>>>
>>> You will miss certain Oracle features, but once you get into the
>>> swing
>>> of postgres you'll not look back. Also consider how much money you'll
>>> save in license fees!
>>>
>>> John Sidney-Woollett
>>>
>>> Gaetano Mendola wrote:
>>>
>>>> Laimis K wrote:
>>>>
>>>>> Hi,
>>>>> I'm oracle man.
>>>>>
>>>>> So, how about features in postgesql which exists in oracle db
>>>>> (order is
>>>>> casual) ?
>>>>> 1. Sequences
>>>>> 2. Packages
>>>>> 3. Functions/procedures
>>>>> 4. Full-text
>>>>> 5. Triggers
>>>>> 6. Jobs
>>>>> 7. Synonyms
>>>>> 8. Replication
>>>>
>>>>
>>>> 1) Serial, but I don't know the Oracle one...
>>>> 2) Schema ?
>>>> 3) Yes, functions
>>>> 4) tsearch2
>>>> 5) Yes
>>>> 6) ??
>>>> 7) ??
>>>> 8) A couple of solutions
>>>>
>>>>
>>>> http://www.postgresql.org/docs/7.4/interactive/index.html
>>>>
>>>>
>>>> Regards
>>>> Gaetano Mendola
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------(end of
>>>> broadcast)---------------------------
>>>> TIP 5: Have you checked our extensive FAQ?
>>>>
>>>> http://www.postgresql.org/docs/faqs/FAQ.html
>>>
>>> ---------------------------(end of
>>> broadcast)---------------------------
>>> TIP 1: subscribe and unsubscribe commands go to
>>> [email protected: majo...@postgresql.org]
>>>
>>
>>
>>
>> ---------------------------(end of
>> broadcast)---------------------------
>> TIP 2: you can get off all lists at once with the unregister command
>> (send "unregister YourEmailAddressHere" to
>> [email protected: majo...@postgresql.org])
>>
> --------------------
>
> Andrew Rawnsley
> President
> The Ravensfield Digital Resource Group, Ltd.
> (740) 587-0114
> www.ravensfield.com
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
2) Adam Ruth Re: Group by - Case insensitivity
| +1 vote
Off the top of my head, I can think of a couple of ways. select lower(name), count(*) from customer...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Off the top of my head, I can think of a couple of ways.

select lower(name), count(*) from customer group by lower(name);

or

select min(name), count(*) from customer group by lower(name);

The second one works if you still want some semblance of the original
casing of the field.


On Jun 28, 2004, at 9:15 AM, UMPA Development wrote:

> Hello all!
>
> Is it possible to setup a group by to be case insensitive and if so
> how?
>
> Thank you!
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
3) Adam Ruth Re: ORDER BY 'DK', 'DE', DESC?
| +1 vote
I only remember it after I try it once and wonder why my trues are at the bottom! Adam Ruth
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On May 20, 2004, at 12:19 PM, Stephan Szabo wrote:

>
> On Thu, 20 May 2004, Adam Ruth wrote:
>
>>
>> On May 20, 2004, at 11:20 AM, Stephan Szabo wrote:
>>
>>> On Tue, 11 May 2004, [ISO-8859-1] Victor Spång Arthursson wrote:
>>>
>>>> Hi!
>>>>
>>>> I would like to know if it's possible to give a priority order of
>>>> how
>>>> to sort the returning rows?
>>>>
>>>> Like for example to order every row with a field language = DK
>>>> first,
>>>> then the rows with field language = *DE' and last the other
>>>> languages,
>>>> ordered alphabetically…?
>>>
>>> Well, I think you can do something like:
>>>
>>> ORDER BY (language = 'DK'), (language = 'DE'), language
>>>
>>> (or you could possibly condense the first two into one with case)
>>
>> Due to the sorting of boolean values, you'd need:
>>
>> ORDER BY language = 'DK' desc, language like '%DE' desc, language;
>
> Yep, someday I'll remember that 0 is less than 1. ;)
>

I only remember it after I try it once and wonder why my trues are at
the bottom!

Adam Ruth
4) Adam Ruth Re: ORDER BY 'DK', 'DE', DESC?
| +1 vote
Due to the sorting of boolean values, you'd need: ORDER BY language = 'DK' desc, language like...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On May 20, 2004, at 11:20 AM, Stephan Szabo wrote:

> On Tue, 11 May 2004, [ISO-8859-1] Victor Spång Arthursson wrote:
>
>> Hi!
>>
>> I would like to know if it's possible to give a priority order of how
>> to sort the returning rows?
>>
>> Like for example to order every row with a field language = DK first,
>> then the rows with field language = *DE' and last the other languages,
>> ordered alphabetically…?
>
> Well, I think you can do something like:
>
> ORDER BY (language = 'DK'), (language = 'DE'), language
>
> (or you could possibly condense the first two into one with case)

Due to the sorting of boolean values, you'd need:

ORDER BY language = 'DK' desc, language like '%DE' desc, language;


>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> [email protected: majo...@postgresql.org]
>
5) Adam Ruth Re: PERFORM function in Plpgsql
| +1 vote
You will want to use EXECUTE instead (assuming var_function is a text variable): EXECUTE...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Apr 29, 2004, at 9:22 AM, Yannick LOUVET wrote:

> hello,
>
> i want to call a function (function1() for example )in an other
> function.
> simple,i guess :
>
> ....
> PERFORM function1() ;

You will want to use EXECUTE instead (assuming var_function is a text
variable):

EXECUTE var_function;

You may need to add parenthesis and a select:

EXECUTE 'select ' || var_function || '()';


> .....
>
> it's ok, but the name of my function is a variable like :
>
>
> .....
> var_function := function1();
> .....
> PERFORM var_function;
>
>
> and it doesn't work !!!
> Is it possible to do that ?
>
> thanks
>
>
> version :
> PostgreSQL 7.3.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.1
> (Mandrake Linux 9.2 3.3.1-1mdk)

spacer
Profile | Posts (32)
Home > People > Adam Ruth