Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 9594C9FA473 for ; Wed, 10 Jan 2007 10:27:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 98770-08 for ; Wed, 10 Jan 2007 10:26:52 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.241]) by postgresql.org (Postfix) with ESMTP id 4553D9FA39B for ; Wed, 10 Jan 2007 10:26:58 -0400 (AST) Received: by an-out-0708.google.com with SMTP id c24so42474ana for ; Wed, 10 Jan 2007 06:26:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=DmK/q6JomUiLjvM+AChJBcnFI3LTukglFe27FIaCHgmyGD/14wf67+gOHlvC2VD+06U67hFe9wtpFHo0mVQIMJhuSfDCUVgT1itHScgQvHzd42EMjzhURNTZEgwLjzO0arADyqRhF/l9UQyPQQrEuKWizQl/PKNudD/RWtDgX5Q= Received: by 10.78.133.10 with SMTP id g10mr99536hud.1168439215778; Wed, 10 Jan 2007 06:26:55 -0800 (PST) Received: by 10.78.90.20 with HTTP; Wed, 10 Jan 2007 06:26:55 -0800 (PST) Message-ID: <3fccaa690701100626h57eb1aa3r8fd1b1de1c2e90b@mail.gmail.com> Date: Wed, 10 Jan 2007 08:26:55 -0600 From: "Andres Olarte" To: "Dave Cramer" Subject: Re: Cc: vasylenko@uksatse.org.ua, pgsql-jdbc@postgresql.org In-Reply-To: <4D21DDDA-29B1-43A1-BB50-838872BC20F3@fastcrypt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4D21DDDA-29B1-43A1-BB50-838872BC20F3@fastcrypt.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/69 X-Sequence-Number: 16434 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 >