[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: [GENERAL] Transactions and ID's generated by triggers
From: Alban Hertroys <dalroi () solfertje ! student ! utwente ! nl>
Date: 2011-02-28 22:44:10
Message-ID: DAE30E45-9EFB-4407-BC29-73A0A01707A7 () solfertje ! student ! utwente ! nl
[Download RAW message or body]
On 28 Feb 2011, at 22:07, Andre Lopes wrote:
> Hi,
>
> Thanks for the reply.
>
> How can I user the RETURNING without pl/sql? My PostgreSQL version is 8.3
>
> Can you give me some example?
http://www.postgresql.org/docs/8.3/interactive/sql-insert.html
Most notably the last example on that page.
> On Mon, Feb 28, 2011 at 7:00 PM, Alban Hertroys
> <dalroi@solfertje.student.utwente.nl> wrote:
> > On 28 Feb 2011, at 24:37, David Johnston wrote:
> >
> > > Using pl/pgsql you can:
> >
> > You don't need pl/pgsql for that. You can return the resultset of the first \
> > insert into a client-side variable (while still making use of the \
> > RETURNING-clause of course).
> > Of course, the benefit of using pl/pgsql for this is that you could make the \
> > desired behaviour independent of client-implementations (which are all too likely \
> > to differ if there are multiple types of clients). However, for that to work \
> > reliably you will need to do some extra work to make sure it's the only possible \
> > code-path for inserting those records.
> > Alban Hertroys
> >
> > --
> > If you can't see the forest for the trees,
> > cut the trees and you'll see there is no forest.
> >
> >
> >
> >
> >
> >
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.
!DSPAM:737,4d6c2543235881724113336!
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic