difference in extract and to_char

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: difference in extract and to_char
Date: 2003-10-14 06:04:52
Message-ID: 3F8B9204.3030904@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I just noticed this fairly silly behaviour:

test=# select to_char(current_date, 'D'), extract(dow from current_date);
to_char | date_part
---------+-----------
3 | 2
(1 row)

I guess we can't change that now, but they really should number their
days from the same base...

Chris

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-10-14 06:30:57 Re: comments on casts
Previous Message Christopher Kings-Lynne 2003-10-14 05:48:01 comments on casts