Re: output format for dates

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: am(at)fx(dot)ro
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: output format for dates
Date: 2002-09-23 14:41:45
Message-ID: 200209231441.g8NEfj906598@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am(at)fx(dot)ro wrote:
> >
> >So, here comes my question: is it possible to create a new
> >custom datestyle and set it as default ?
>
> Browsing the sources, i've found a function EncodeDateOnly() in
> src/backend/utils/adt which seems to be the function that generates
> strings representing dates.
>
> It seems easy to add a 'case' statement for a new datestyle.
> But, i guess that won't be enough.
>
> Where else should I add the new datestyle, so that i'll be able to
> use it with SET DATESTYLE ?

7.3 will have SET DATESTYLE:

test=> set datestyle to 'iso,european';

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-09-23 14:45:26 Re: Tips for re-using function results within single insert
Previous Message Bruce Momjian 2002-09-23 14:37:27 Re: Open Source Database article