Fwd: Re: [GENERAL] sort character data in arbitrary order?

2006-01-14 Thread Robert Paulsen
On Saturday 14 January 2006 14:06, Andrew - Supernews wrote: > On 2006-01-14, Robert Paulsen <[EMAIL PROTECTED]> wrote: > > Here is my query so far: > > > > SELECT foo, bar, baz, FROM my_table WHERE state ~ '[abc]' > > ORDER BY state ASC

Re: [GENERAL] sort character data in arbitrary order?

2006-01-14 Thread Robert Paulsen
On Saturday 14 January 2006 14:10, Michael Fuhr wrote: > On Sat, Jan 14, 2006 at 01:38:52PM -0600, Robert Paulsen wrote: > > SELECT foo, bar, baz, FROM my_table WHERE state ~ '[abc]' > > ORDER BY state ASC LIMIT 1. > > > > This works as expected. M

[GENERAL] sort character data in arbitrary order?

2006-01-14 Thread Robert Paulsen
Hi, I need to query a database for a record with the "best" value in a one-character field. The field is named "state" and I need a record with a state of 'a', 'b', or 'c'. There may be more than one matching record but I want the "best" one where "best" is defined as state 'a', or if there are

Re: [GENERAL] idle processes

2004-08-14 Thread Robert Paulsen
On Saturday 14 August 2004 11:17 pm, CSN wrote: > I'm using regular pg_connect's. The processes > eventually went away - was just wondering why they'd > stick around. > Well, unless I misunderstand, when a script ends the connection should go away and I think that means the postgres process suppo