RE: [INTERFACES] ecpg and getting just assigned serial number
RE: [INTERFACES] ecpg and getting just assigned serial number
От:
"Ansley, Michael" <Michael.Ansley@intec.co.za>
Дата:
I don't think that a sequence number should be going into sqlca. This is what it sounds like you are going to do, yes? If anything is going to be returned in sqlca, it should only be the oid, at least until Postgres gets a serial type (and probably after that as well), and each table is guaranteed to only have one serial. In effect, that's what the oid is, so if the insert returns the oid in sqlca, then you can select based on the oid. Problem solved. And this is only for a single insert (i.e. an insert with the VALUES keyword). For multiple inserts (INSERT INTO
Re: [INTERFACES] ecpg and getting just assigned serial number
От:
Michael Meskes <meskes@postgresql.org>
Дата:
On Wed, Sep 15, 1999 at 09:50:52AM +0200, Ansley, Michael wrote: > I don't think that a sequence number should be going into sqlca. This is > what it sounds like you are going to do, yes? But this wasn't what I meant. :-) I wasn't wording very well. What I wanted to say was that I don't see much of a chance to give back the serial as such. What I added to my TODO list (and btw just committed the changed source) is the return of the OID for the singleton insert. Michael -- Michael Meskes | Go SF 49ers! Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire! Tel.: (+49) 2431/72651 | Use Debian GNU/Linux! Email: Michael@Fam-Meskes.De | Use PostgreSQL!