X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3620D329F46 for ; Tue, 28 Sep 2004 11:40:59 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 65923-10 for ; Tue, 28 Sep 2004 10:40:55 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 3EBF1329ED6 for ; Tue, 28 Sep 2004 11:40:55 +0100 (BST) Received: (qmail 5288 invoked by uid 1112); 28 Sep 2004 10:40:53 -0000 Date: Tue, 28 Sep 2004 05:40:53 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Nathan Crause Cc: pgsql-jdbc@postgresql.org Subject: Re: PreparedStatement In-Reply-To: <4158292F.8070503@uniclear.com> Message-ID: References: <4155A54D.10002@uniclear.com> <4155DD55.3090607@uniclear.com> <4158292F.8070503@uniclear.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/194 X-Sequence-Number: 11084 On Mon, 27 Sep 2004, Nathan Crause wrote: > I'm wondering if there is some way to make a trigger on the sequences > themselves. Create some sort of session-specific temporary table which > contains records of all auto-generated sequences in that session, and > then figure out some way to return only the portion which was created by > the last INSERT (perhaps something as simple as flushing the table after > each resultset it returned to the connection). > This looks like an application kind of fix, not a library solution. A JDBC driver can't go around creating tables and triggers and other things. It might be worthwhile to investigate how other JDBC drivers handle this. So far I've only looked at MySQL, but checking MaxDB and Firebird's driver source would be revealing. Checking commercial drivers would be good too, but I'm not sure how legal that is. Kris Jurka