Re: Re: [JDBC] New backend functions? [was Re: JDBC changes for 7.2... some questions...]

From: Rene Pijlman <rpijlman(at)wanadoo(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com>, 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: Re: [JDBC] New backend functions? [was Re: JDBC changes for 7.2... some questions...]
Date: 2001-08-23 19:45:13
Message-ID: 3lmaot0kc4oqeutmh4mk66lsmgsbeljhgc@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On Thu, 23 Aug 2001 14:44:19 -0400, you wrote:
>Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com> writes:
>> Should the backend support the function getLastInsertedOID()?
>
>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.

What should the semantics be exactly?

How about the multiple INSERT's i've been reading about on
hackers? ... Only the OID of the last row inserted by the
statement?

How about an UPDATE statement that updates multiple rows?

How about JDBC batchExecute() when it performs multiple
INSERT/UPDATE's? ... Only the OID of the last UPDATE or INSERT
statement in the batch?

How about triggers that insert/update extra rows? ... Only the
OID of the row directly inserted by the client statement?

How about Large Objects? Should inserting or updating a large
object affect getLastInsertedOID()?

I assume this OID would be associated with a client connection.
Is this going to work with client side connection pooling?

How about transaction semantics? INSERT row 1, Commit, INSERT
row 2, Rollback... what should getLastInsertedOID() return? Can
it, with a static variable?

Regards,
René Pijlman

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2001-08-23 20:00:10 Re: Toast, Text, blob bytea Huh?
Previous Message Rene Pijlman 2001-08-23 19:33:35 Re: Toast, Text, blob bytea Huh?

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2001-08-23 19:50:09 Re: JDBC patch for util.Serialize and jdbc2.PreparedStatement
Previous Message Rene Pijlman 2001-08-23 19:17:06 Re: Re: Couple of patches for jdbc driver