Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id AD6876333B3 for ; Fri, 8 Jan 2010 20:10:51 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 11440-04 for ; Sat, 9 Jan 2010 00:10:40 +0000 (UTC) X-Greylist: delayed 00:07:15.653405 by SQLgrey-1.7.6 Received: from irvnca2-mx-01.trustcommerce.com (mx1.sna.trustcommerce.com [207.38.46.53]) by mail.postgresql.org (Postfix) with ESMTP id 5242D632F08 for ; Fri, 8 Jan 2010 20:10:41 -0400 (AST) Received: from [192.168.1.108] (unknown [65.91.38.42]) by irvnca2-mx-01.trustcommerce.com (Postfix) with ESMTP id 4E4FC4060D for ; Fri, 8 Jan 2010 16:03:23 -0800 (PST) Message-ID: <4B47C7E9.4030000@trustcommerce.com> Date: Fri, 08 Jan 2010 16:03:53 -0800 From: Johnny Luong Organization: TrustCommerce User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: issuing insert preparedstatement queries with default values X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.589 tagged_above=-10 required=5 tests=BAYES_00=-2.599, FH_DATE_PAST_20XX=3.188 X-Spam-Level: X-Archive-Number: 201001/2 X-Sequence-Number: 20198 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Is there a way to use the DEFAULT per column value on an INSERT sql in PG through the PreparedStatement JDBC API? It'd be nice so that I don't have to maintain a secondary list of PreparedStatements or a list of default values maintained outside of the database definition. e.g: INSERT INTO foo (a, b) (?, ?) where b has a default value in the database and a is something that I might set to some other value. I'm using postgresql-8.3-603.jdbc4.jar against a 8.3 postgresql server. Thanks, Johnny -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktHx+kACgkQnQTBLXttTeVEmgCePgPqSGOtZvii/nGWEVaGeF+l VX4An0LVEB9Rhlsc0s8j91oTwLOoKS4L =s1Fo -----END PGP SIGNATURE-----