Re: output format for dates - Mailing list pgsql-general

From Bruce Momjian
Subject Re: output format for dates
Date
Msg-id 200209231441.g8NEfj906598@candle.pha.pa.us
Whole thread Raw
In response to output format for dates  (am@fx.ro)
List pgsql-general
am@fx.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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Open Source Database article
Next
From: Tom Lane
Date:
Subject: Re: Tips for re-using function results within single insert