Re: Multiple queries in transit - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Multiple queries in transit
Date
Msg-id m2y5w0x2g8.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: Multiple queries in transit  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> I think a common use for this would be doing multiple inserts or updates on
> one go. Like, insert into a parent table, then more details into child
> tables. You don't care about getting the results back in that case, as long
> as you get an error on failure.

As of 9.1 you can use WITH to achieve that in many cases.
wCTE and INSERT|UPDATE|DELETE … RETURNING are pretty cool combined :)

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


pgsql-hackers by date:

Previous
From: Scott Mead
Date:
Subject: IDLE in transaction introspection
Next
From: Magnus Hagander
Date:
Subject: Re: IDLE in transaction introspection