pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Goodenough <david.goodenough@btconnect.com>
To: pgsql-jdbc@postgresql.org
Subject: setString and timestamps
Date: Fri, 17 Feb 2006 16:07:17 +0000
Message-ID: <200602171607.18071.david.goodenough@btconnect.com> (raw)

I understand from looking at the archive that there some changes around
8.0 in this area, but I am confused as to how to proceed.

I have some code which takes a table and inserts values into it where the
values have come from XML and are thus all strings.  Some of these XML
fields are timestamps, but this generic code does not have table specific 
knowledge.

From what I have read I think I have to use something like the metadata
for this table to find the type of this column, and if it is a timestamp then
I need to take the string and convert it into a timestamp before I set it
into the parameterized insert.  Is this right, and are there any other 
datatypes which are not implicitly converted from String to whatever is
necessary?

If it is only timestamps, why are they singled out for this special treatment?

Also there was some question about the difference between timestamps
with and without zone, mine are without should that make a difference.

Is there a HOWTO about this somewhere?

David



view thread (5+ messages)  latest in thread

Message-ID: <200602171607.18071.david.goodenough@btconnect.com>
Permalink:  ../200602171607.18071.david.goodenough@btconnect.com/
Also on:    postgresql.org/message-id/200602171607.18071.david.goodenough@btconnect.com

 · 

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: david.goodenough@btconnect.com
  Subject: Re: setString and timestamps
  In-Reply-To: <200602171607.18071.david.goodenough@btconnect.com>
  References: <200602171607.18071.david.goodenough@btconnect.com>

* 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