pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: emergency.shower@gmail.com <emergency.shower@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Timestamp weirdness
Date: Sun, 24 Jul 2005 23:06:23 -0400
Message-ID: <BA330BC6-370B-4260-8880-5EF9C60642F2@fastcrypt.com> (raw)
In-Reply-To: <42E42721.5010606@opencloud.com>
References: <bdf1a09805072414582d75b940@mail.gmail.com>
	<42E4158D.3020902@opencloud.com>
	<14992.1122245290@sss.pgh.pa.us>
	<42E42721.5010606@opencloud.com>


On 24-Jul-05, at 7:41 PM, Oliver Jowett wrote:

> Tom Lane wrote:
>
>
>>> emergency.shower@gmail.com wrote:
>>>
>>>
>>>> 4) When reading from a TIMESTAMP WITH TIME ZONE field, the driver
>>>> should create a Timestamp by interpreting the y, M, d, H, m, s  
>>>> values
>>>> as UTC timestamp fields. The Calendar, if given, should be ignored.
>>>>
>
>
>> Surely 4 should read "by interpreting the y...s values as a timestamp
>> in the zone specified as part of the value", not as necessarily UTC.
>>
>
> Yes, you're right.
>
>
>> The difficulty with both 2 and 3 is that the driver has no very  
>> good way
>> of knowing whether it's writing to a timestamp with tz or one  
>> without.
>> We can know the parameter datatype we send, but if that gets  
>> converted
>> to the other type within the server, you're going to get burnt.
>>
>
> I'm leaning towards using UNKNOWN as the least-bad option for now,  
> plus
> some extension mechanism so you can override it if the type inference
> does go wrong. Hopefully that should make the commonly-used cases work
> without applications needing to do anything weird.

Seems like this is the only way to go for now. +1 from me.
>
> -O
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>
>

Dave Cramer
davec@postgresintl.com
www.postgresintl.com
ICQ #14675561
jabber davecramer@jabber.org
ph (519 939 0336 )




view thread (20+ messages)  latest in thread

Message-ID: <BA330BC6-370B-4260-8880-5EF9C60642F2@fastcrypt.com>
Permalink:  ../BA330BC6-370B-4260-8880-5EF9C60642F2@fastcrypt.com/
Also on:    postgresql.org/message-id/BA330BC6-370B-4260-8880-5EF9C60642F2@fastcrypt.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: pg@fastcrypt.com, oliver@opencloud.com, tgl@sss.pgh.pa.us, emergency.shower@gmail.com
  Subject: Re: Timestamp weirdness
  In-Reply-To: <BA330BC6-370B-4260-8880-5EF9C60642F2@fastcrypt.com>
  References: <bdf1a09805072414582d75b940@mail.gmail.com> <42E4158D.3020902@opencloud.com> <14992.1122245290@sss.pgh.pa.us> <42E42721.5010606@opencloud.com> <BA330BC6-370B-4260-8880-5EF9C60642F2@fastcrypt.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