Skip site navigation (1) Skip section navigation (2)

Re: datetime error?

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: datetime error?
Date: 2002-01-04 10:23:08
Message-ID: 20020104112308.A18675@zf.jcu.cz (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, Jan 03, 2002 at 03:56:23PM +0000, Thomas Lockhart wrote:
> 
> >    The basic difference is that timestamp2tm() with right output do
> >    code that call localtime() and timestamp2tm() with bad output skip
> >    it, because 'tzp' is not defined ("if (tzp != NULL)" in this
> >    timestamp2tm()).
> 
> Ah! Have you tried calling timestamptz_date() instead? That one allows
> handling time zones internally. Before 7.2, timestamp_date() did handle
> time zones, but now we have TIMESTAMP WITHOUT TIME ZONE and TIMESTAMP
> WITH TIME ZONE so those internal routines changed out from under you.

 You are right. 

 I don't want send patch with 2 chars. Can you or anyone other fix it
 in src/backend/utils/adt/formatting.c in function to_date (line cca 
 3130) and rename timestamp_date to timestamptz_date?
                                             ^^
 Thanks. The formatting.c is ready to RC1 with this fix.

        Karel
 
-- 
 Karel Zak  <zakkr(at)zf(dot)jcu(dot)cz>
 http://home.zf.jcu.cz/~zakkr/
 
 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

In response to

Responses

pgsql-hackers by date

Next:From: Hannu KrosingDate: 2002-01-04 11:45:43
Subject: Re: LWLock contention: I think I understand the problem
Previous:From: Daniel KalchevDate: 2002-01-04 08:07:21
Subject: Re: Bulkloading using COPY - ignore duplicates?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group