Re: Multiple queries in transit

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: Multiple queries in transit
Дата
Msg-id m2y5w0x2g8.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: Multiple queries in transit  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список 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 по дате отправления:

Предыдущее
От: Scott Mead
Дата:
Сообщение: IDLE in transaction introspection
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: IDLE in transaction introspection