From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com> |
Cc: | Barry Lind <barry(at)xythos(dot)com>, pgsql-hackers(at)postgresql(dot)org, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: [JDBC] New backend functions? [was Re: JDBC changes for 7.2... some questions...] |
Date: | 2001-08-23 18:44:19 |
Message-ID: | 6337.998592259@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-jdbc |
Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com> writes:
> Should the backend support the function getLastInsertedOID() or even
> getLastInsertedPrimaryKey() (or both)?
I don't think you have any chance of doing the latter --- for one thing,
how are you going to declare that function's return type? But the
former seems doable and reasonable to me: whenever an OID is returned
to the client in an INSERT or UPDATE command result, also stash it in
a static variable that can be picked up by this function.
Please pick a more SQL-friendly (ie, case insensitive) naming
convention, though. And note that it'd apply to both INSERT and UPDATE.
Maybe get_last_returned_oid() ?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-08-23 19:00:46 | Re: A couple items on TODO |
Previous Message | Christopher Masto | 2001-08-23 18:09:24 | Re: Escaping strings for inclusion into SQL queries |
From | Date | Subject | |
---|---|---|---|
Next Message | Rene Pijlman | 2001-08-23 19:14:22 | Re: Re: Accessing multiple Databases at the same time |
Previous Message | Robert B. Easter | 2001-08-23 18:37:27 | JDBC patch for util.Serialize and jdbc2.PreparedStatement |