Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 5D8999FA4A0 for ; Wed, 10 Jan 2007 11:36:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 93945-06 for ; Wed, 10 Jan 2007 11:36:20 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 7ED579FA440 for ; Wed, 10 Jan 2007 11:36:21 -0400 (AST) Received: (qmail 16430 invoked from network); 10 Jan 2007 15:36:19 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 10 Jan 2007 15:36:19 -0000 In-Reply-To: <3fccaa690701100626h57eb1aa3r8fd1b1de1c2e90b@mail.gmail.com> References: <4D21DDDA-29B1-43A1-BB50-838872BC20F3@fastcrypt.com> <3fccaa690701100626h57eb1aa3r8fd1b1de1c2e90b@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <635CFBA4-3FCD-4EAD-A444-7603F086CC3A@fastcrypt.com> Cc: vasylenko@uksatse.org.ua, pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Date: Wed, 10 Jan 2007 10:36:24 -0500 To: Andres Olarte X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/70 X-Sequence-Number: 16435 Andres, what he is looking for is to not have to select the id and still have the rowset work. Dave On 10-Jan-07, at 9:26 AM, Andres Olarte wrote: > You can do the same with JDBC. Don't set a value for your id column > in the ResultSet. The backend will do it for you. > > On 1/10/07, Dave Cramer wrote: >> What you are looking for is in hibernate, or some other high level >> persistence framework . In JDBC you have to do all the work. >> >> Dave >> >> On 10-Jan-07, at 8:16 AM, vasylenko@uksatse.org.ua wrote: >> >> > >> > >> > Such declaration like this >> > >> > id int4 NOT NULL DEFAULT nextval('seq_group_id'::regclass) >> > and >> > CONSTRAINT i_group PRIMARY KEY (id) >> > >> > give me the oportumity don't bother about unique value of id >> > and use another query. >> > >> > INSERT INTO groups(g_name) VALUES("new group"); >> > >> > I hope to find the same easy way in using ResultSet's objects (), >> > i.e. to >> > forget about id in my code until it nessesary for me and not for >> jdbc. >> > >> > ---------------------------(end of >> > broadcast)--------------------------- >> > TIP 1: if posting/reading through Usenet, please send an >> appropriate >> > subscribe-nomail command to majordomo@postgresql.org so that >> > your >> > message can get through to the mailing list cleanly >> >> >> ---------------------------(end of >> broadcast)--------------------------- >> TIP 6: explain analyze is your friend >> > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org >