Thread: ecpg and the timezone database

ecpg and the timezone database

From
Bruce Momjian
Date:
Does ecpg need to use the same timezone database as the backend?

I just committed code so it will not, but I am not sure.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: ecpg and the timezone database

From
"Andrew Dunstan"
Date:
Bruce Momjian said:
> Does ecpg need to use the same timezone database as the backend?
>
> I just committed code so it will not, but I am not sure.
>

surely all clients should be utterly ignorant of what the backend uses?

cheers

andrew




Re: ecpg and the timezone database

From
Bruce Momjian
Date:
Andrew Dunstan wrote:
> Bruce Momjian said:
> > Does ecpg need to use the same timezone database as the backend?
> >
> > I just committed code so it will not, but I am not sure.
> >
> 
> surely all clients should be utterly ignorant of what the backend uses?

OK, just asking the question to be sure.  I was a little concerned that
ecpg would be looking at some binary data from the backend and trying to
do some timezone comparison on it.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: ecpg and the timezone database

From
Michael Meskes
Date:
On Fri, Apr 30, 2004 at 04:48:33PM -0400, Bruce Momjian wrote:
> Does ecpg need to use the same timezone database as the backend?

I have to check what you changed. ecpg itself does not use the timezone
database, but some of that code is used in pgtypeslib.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


Re: [INTERFACES] ecpg and the timezone database

From
Bruce Momjian
Date:
Michael Meskes wrote:
> On Fri, Apr 30, 2004 at 04:48:33PM -0400, Bruce Momjian wrote:
> > Does ecpg need to use the same timezone database as the backend?
> 
> I have to check what you changed. ecpg itself does not use the timezone
> database, but some of that code is used in pgtypeslib.

Yea, that's where I saw it used.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: ecpg and the timezone database

From
Bruce Momjian
Date:
Michael Meskes wrote:
> On Fri, Apr 30, 2004 at 04:48:33PM -0400, Bruce Momjian wrote:
> > Does ecpg need to use the same timezone database as the backend?
> 
> I have to check what you changed. ecpg itself does not use the timezone
> database, but some of that code is used in pgtypeslib.

For changes see include/port.h:#define localtime(timep) pg_localtime(timep)#define gmtime(timep)
pg_gmtime(timep)#defineasctime(timep) pg_asctime(timep)#define ctime(timep) pg_ctime(timep)#define difftime(t1,t2)
pg_difftime(t1,t2)#definemktime(tm) pg_mktime(tm)#define tzset pg_tzset
 

Right now it is only Win32, but there are plans to use this for all
ports.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073