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
In response to
pgsql-hackers by date
|Next:||From: Peter Eisentraut||Date: 2001-08-23 19:00:46|
|Subject: Re: A couple items on TODO |
|Previous:||From: Christopher Masto||Date: 2001-08-23 18:09:24|
|Subject: Re: Escaping strings for inclusion into SQL queries|
pgsql-jdbc by date
|Next:||From: Rene Pijlman||Date: 2001-08-23 19:14:22|
|Subject: Re: Re: Accessing multiple Databases at the same time |
|Previous:||From: Robert B. Easter||Date: 2001-08-23 18:37:27|
|Subject: JDBC patch for util.Serialize and jdbc2.PreparedStatement|