Re: [SQL] on connect/on disconnect

2006-09-10 Thread Aaron Bono
On 9/10/06, Robert Edwards <[EMAIL PROTECTED]> wrote: As I understand it, connection pooling, as used by a web app, stillneeds to connect "per-database-user" (and usually this is the same"web-server" user). If the web app is connecting to the database server as different database users, then differ

Re: [SQL] where clause subqueries vs multiple rows results

2006-09-10 Thread Richard Broersma Jr
> I've a query which I'd have liked to word akin to: > > SELECT guid FROM child WHERE the_fkey = > ( SELECT id FROM parent WHERE name ~ 'some_regex' ) > ORDER BY the_fkey, my_pkey; > > I got around it by doing the SELECT id first, and then doing a SELECT > guid for each row re

Re: [SQL] where clause subqueries vs multiple rows results

2006-09-10 Thread Aaron Bono
Oops, see correction below...On 9/10/06, Aaron Bono <[EMAIL PROTECTED]> wrote: On 9/10/06, James Cloos <[EMAIL PROTECTED]> wrote: I've a query which I'd have liked to word akin to:  SELECT guid FROM child WHERE the_fkey = ( SELECT id FROM parent WHERE name ~ 'some_regex' ) ORDER BY

Re: [SQL] where clause subqueries vs multiple rows results

2006-09-10 Thread Aaron Bono
On 9/10/06, James Cloos <[EMAIL PROTECTED]> wrote: I've a query which I'd have liked to word akin to:  SELECT guid FROM child WHERE the_fkey = ( SELECT id FROM parent WHERE name ~ 'some_regex' ) ORDER BY the_fkey, my_pkey;I got around it by doing the SELECT id first, and then doing

Re: [SQL] on connect/on disconnect

2006-09-10 Thread Robert Edwards
Hi Aaron, Thanks for your response. I guess I wasn't clear about "users". I am referring to database users, not application users (although they are the same in my application in any case - that is, each application user is known to the database as a different database user). As I understand it

[SQL] where clause subqueries vs multiple rows results

2006-09-10 Thread James Cloos
I've a query which I'd have liked to word akin to: SELECT guid FROM child WHERE the_fkey = ( SELECT id FROM parent WHERE name ~ 'some_regex' ) ORDER BY the_fkey, my_pkey; I got around it by doing the SELECT id first, and then doing a SELECT guid for each row returned, appendin

Re: [SQL] on connect/on disconnect

2006-09-10 Thread Aaron Bono
On 9/10/06, Robert Edwards <[EMAIL PROTECTED]> wrote: (this is my first post to this list...)I am wondering if Postgres, and/or SQL in general, has a facility torun a function at connection set-up time (after a successful connectionattempt) and/or at session completion (or disconnect)? I want to pr

[SQL] on connect/on disconnect

2006-09-10 Thread Robert Edwards
(this is my first post to this list...) I am wondering if Postgres, and/or SQL in general, has a facility to run a function at connection set-up time (after a successful connection attempt) and/or at session completion (or disconnect)? I want to pre-populate a table (actually an INSERT rule on a