Re: [HACKERS] PGparam timestamp question

2007-12-10 Thread Andrew Chernow
>>Or was the code incorrectly used? Hard for me to say, but I think its about caller context. The way I am using it might be different ... hey the function was static ... copy & paster be warned! The code appears to be doing the same thing as the backend (with the exclusion of backend stuff l

Re: [HACKERS] PGparam timestamp question

2007-12-10 Thread Michael Meskes
On Sun, Dec 09, 2007 at 11:54:25AM -0500, Andrew Chernow wrote: > That explains why my libpq code was getting 3AM for "without time zone" > values. I am using code from src/interfaces/ecpg/pgtypeslib/timestamp.c > timestamp2tm(). That uses localtime() after converting the timestamp to an > epo

Re: [HACKERS] PGparam timestamp question

2007-12-09 Thread Andrew Chernow
got it. stored vs. displyed was confusing me. Andrew Tom Lane wrote: Andrew Chernow <[EMAIL PROTECTED]> writes: Okay, thanks. So using WITHOUT TIME ZONE basically means, store the provided value as UTC. Meaning, 8AM EST NOW() is stored/treated as 8AM UTC. No, I think you are more confuse

Re: [HACKERS] PGparam timestamp question

2007-12-09 Thread Tom Lane
Andrew Chernow <[EMAIL PROTECTED]> writes: > Okay, thanks. So using WITHOUT TIME ZONE basically means, store the provided > value as UTC. Meaning, 8AM EST NOW() is stored/treated as 8AM UTC. No, I think you are more confused now than you were before. For both types, the underlying stored value

Re: [HACKERS] PGparam timestamp question

2007-12-09 Thread Robert Treat
On Sunday 09 December 2007 11:54, Andrew Chernow wrote: > Okay, thanks. So using WITHOUT TIME ZONE basically means, store the > provided value as UTC. Meaning, 8AM EST NOW() is stored/treated as 8AM > UTC. > Not quite. Using WITHOUT TIME ZONE means to not store any time zone information. It app

Re: [HACKERS] PGparam timestamp question

2007-12-09 Thread Andrew Chernow
Okay, thanks. So using WITHOUT TIME ZONE basically means, store the provided value as UTC. Meaning, 8AM EST NOW() is stored/treated as 8AM UTC. That explains why my libpq code was getting 3AM for "without time zone" values. I am using code from src/interfaces/ecpg/pgtypeslib/timestamp.c tim

Re: [HACKERS] PGparam timestamp question

2007-12-09 Thread Robert Treat
On Sunday 09 December 2007 09:44, Andrew Chernow wrote: > I am trying to add support for timestamps in our proposed libpq PGparam > patch. I ran into something I don't really understand. I wasn't sure if it > was my libpq code that was wrong (converts a binary timestamp into a time_t > or struct t

[HACKERS] PGparam timestamp question

2007-12-09 Thread Andrew Chernow
I am trying to add support for timestamps in our proposed libpq PGparam patch. I ran into something I don't really understand. I wasn't sure if it was my libpq code that was wrong (converts a binary timestamp into a time_t or struct tm) so I tried it from psql. Server is using EST (8.3devel)