Re: [SQL] Datetime

2004-08-03 Thread Michael Glaesemann
On Aug 4, 2004, at 7:55 AM, Tom Lane wrote: Sorry if I added to the confusion instead of dispelling it. Not at all. I had no idea how timestamps are stored internally, but I do now. I just knew it wasn't UNIX epoch or the same as the text representation displayed in results. Your explanation has

Re: [SQL] Datetime

2004-08-03 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > I don't quite understand how I am wrong in saying that PostgreSQL does > not use UNIX epoch timestamps internally, as you've clearly explained > it doesn't. We are talking at cross-purposes. I thought you were suggesting that PG doesn't use a sec

Re: [SQL] Datetime

2004-08-03 Thread Michael Glaesemann
On Aug 4, 2004, at 12:13 AM, Tom Lane wrote: Michael Glaesemann <[EMAIL PROTECTED]> writes: No. I'm just saying that PostgreSQL does not represent or store timestamps as epoch timestamps internally. You're wrong. It's not exactly Unix-like because we use a different epoch date (2000-1-1 not 1970-1-

Re: [SQL] Datetime

2004-08-03 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > No. I'm just saying that PostgreSQL does not represent or store > timestamps as epoch timestamps internally. You're wrong. It's not exactly Unix-like because we use a different epoch date (2000-1-1 not 1970-1-1) but the concept is just the same: w

Re: [SQL] Datetime

2004-08-03 Thread Michael Glaesemann
On Aug 3, 2004, at 8:50 PM, Achilleus Mantzios wrote: O kyrios Michael Glaesemann egrapse stis Aug 3, 2004 : I believe this is incorrect. I believe PostgreSQL uses its own Do you suggest postgresql has any other means of getting time except the time(2) syscall?? timestamp datatype internally (which

Re: [SQL] Datetime

2004-08-03 Thread Achilleus Mantzios
O kyrios Michael Glaesemann egrapse stis Aug 3, 2004 : > > On Aug 3, 2004, at 7:23 PM, Achilleus Mantzios wrote: > > > now() returns the current UNIX (your running UNIX right?) timestamp > > which > > in turn is > > measured in seconds,miliseconds since the epoch. > > i.e. 1970-01-01 00:00:00 >

Re: [SQL] Datetime

2004-08-03 Thread Michael Glaesemann
On Aug 3, 2004, at 7:23 PM, Achilleus Mantzios wrote: now() returns the current UNIX (your running UNIX right?) timestamp which in turn is measured in seconds,miliseconds since the epoch. i.e. 1970-01-01 00:00:00 I believe this is incorrect. I believe PostgreSQL uses its own timestamp datatype in

Re: [SQL] Datetime

2004-08-03 Thread Achilleus Mantzios
O kyrios Pedro B. egrapse stis Aug 3, 2004 : > Hello, > > I'm using a TIMESTAMP column with a now() default which (correctly i > assume) uses a '-mm-dd hh:mm:ss' format. Wrong!, timestamp does not use any human readable format to be stored. Its not like MS* tools where dates/times are actua

Re: [SQL] Datetime

2004-08-03 Thread Devrim GUNDUZ
Hi, On Tue, 3 Aug 2004, Pedro B. wrote: > I'm using a TIMESTAMP column with a now() default which (correctly i > assume) uses a '-mm-dd hh:mm:ss' format. > > Is it possible to make it something like '-mm-dd hh:mm:ss:cc' ? > (basically, a DATE and a TIME, but with 2 decimal cases on th

Re: [SQL] Datetime

2004-08-03 Thread Michael Glaesemann
On Aug 3, 2004, at 4:22 PM, Pedro B. wrote: Is it possible to make it something like '-mm-dd hh:mm:ss:cc' ? (basically, a DATE and a TIME, but with 2 decimal cases on the :cc and not .c as the TIME format. timestamp and timestamptz both take an optional precision parameter. What you want

[SQL] Datetime

2004-08-03 Thread Pedro B.
Hello, I'm using a TIMESTAMP column with a now() default which (correctly i assume) uses a '-mm-dd hh:mm:ss' format. Is it possible to make it something like '-mm-dd hh:mm:ss:cc' ? (basically, a DATE and a TIME, but with 2 decimal cases on the :cc and not .c as the TIME format. Tha