pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lew <noone@lwsc.ehost-services.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: issuing insert preparedstatement queries with default values
Date: Sat, 30 Jan 2010 16:11:04 -0500
Message-ID: <hk2798$iq7$2@news.albasani.net> (raw)
In-Reply-To: <4B47EF53.6090404@trustcommerce.com>
References: <4B47C7E9.4030000@trustcommerce.com>
	<4B47E6A5.2090009@ttc-cmc.net>
	<4B47EF53.6090404@trustcommerce.com>

Johnny Luong wrote:
> |> 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.
...
> | TableEntryForm addUpdateTableEntry() Connection Created
> | INSERT INTO "public"."key_table4" ("avatar_id", "user_id", "bing_id")
> | VALUES (?, ?, default)
> | TableEntryForm addUpdateTableEntry() Connection Closed

I just leave out the columns in the INSERT for which I want default values.

-- 
Lew



view thread (4+ messages)

Message-ID: <hk2798$iq7$2@news.albasani.net>
Permalink:  ../hk2798$iq7$2@news.albasani.net/
Also on:    postgresql.org/message-id/hk2798$iq7$2@news.albasani.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: noone@lwsc.ehost-services.com
  Subject: Re: issuing insert preparedstatement queries with default values
  In-Reply-To: <hk2798$iq7$2@news.albasani.net>
  References: <4B47C7E9.4030000@trustcommerce.com> <4B47E6A5.2090009@ttc-cmc.net> <4B47EF53.6090404@trustcommerce.com> <hk2798$iq7$2@news.albasani.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox