Thread: permanent EuroDates

permanent EuroDates

From
Yury Bokhoncovich
Date:
Hello!

Need advice: where is the right place to get eurodates "by default"?

AFAIK there is 3 opportunity:

1) to change default assignments from Eurodates=false to =true in
backend/utils/init/globals.c (IMHO by configure option --with-eurodates)
2) to add an extra option to postmaster (just for convenience, -o"-e"
looks quite ugly, it will be transparently passed to all postgres on
those start-up)
3) to add ConfigOption "eurodates" alike "fsync".

The last is one the less familar to me but it seems to be good point in
common tendention to move command-line arguments to postgresql.conf .

-- 
WBR, Yury Bokhoncovich, Senior System Administrator, NOC of F1 Group.
Phone: +7 (3832) 106228, ext.140, E-mail: byg@center-f1.ru.
Unix is like a wigwam -- no Gates, no Windows, and an Apache inside.




Re: permanent EuroDates

From
Oliver Elphick
Date:
On Mon, 2002-03-04 at 07:11, Yury Bokhoncovich wrote:
> Need advice: where is the right place to get eurodates "by default"?

export PGDATESTYLE=Iso,European
pg_ctl start

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
    "Give, and it will be given to you. A good measure,      pressed down, taken together and running over,      will
bepoured into your lap. For with the same      measure that you use, it will be measured to      you."         Luke
6:38
 



Re: permanent EuroDates

From
Yury Bokhoncovich
Date:
On 4 Mar 2002, Oliver Elphick wrote:

> On Mon, 2002-03-04 at 07:11, Yury Bokhoncovich wrote:
> > Need advice: where is the right place to get eurodates "by default"?
>
> export PGDATESTYLE=Iso,European
> pg_ctl start

Mmmm...but if I wanna POSTGRES-like time format with eurodates?
Option -e of postgres works fine but its absence in postmaster
is a pain IMHO. Messing with environement variable is bad IMHO.

-- 
WBR, Yury Bokhoncovich, Senior System Administrator, NOC of F1 Group.
Phone: +7 (3832) 106228, ext.140, E-mail: byg@center-f1.ru.
Unix is like a wigwam -- no Gates, no Windows, and an Apache inside.




Re: permanent EuroDates

From
Oliver Elphick
Date:
On Mon, 2002-03-04 at 09:25, Yury Bokhoncovich wrote:
> On 4 Mar 2002, Oliver Elphick wrote:
> 
> > On Mon, 2002-03-04 at 07:11, Yury Bokhoncovich wrote:
> > > Need advice: where is the right place to get eurodates "by default"?
> >
> > export PGDATESTYLE=Iso,European
> > pg_ctl start
> 
> Mmmm...but if I wanna POSTGRES-like time format with eurodates?

export PGDATESTYLE=Postgres,European

> Option -e of postgres works fine but its absence in postmaster
> is a pain IMHO. Messing with environement variable is bad IMHO.

You can limit it to pg_ctl itself:
 PGDATESTYLE=Postgres,European pg_ctl...

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
    "Give, and it will be given to you. A good measure,      pressed down, taken together and running over,      will
bepoured into your lap. For with the same      measure that you use, it will be measured to      you."         Luke
6:38
 



Re: permanent EuroDates

From
Tom Lane
Date:
Yury Bokhoncovich <byg@center-f1.ru> writes:
> 3) to add ConfigOption "eurodates" alike "fsync".

Not eurodates per se.  There should be a postgresql.conf option for
DateStyle, which'd allow you to set what you want.  Not sure why it's
not there already :-(
        regards, tom lane


Re: permanent EuroDates

From
Bruce Momjian
Date:
Tom Lane wrote:
> Yury Bokhoncovich <byg@center-f1.ru> writes:
> > 3) to add ConfigOption "eurodates" alike "fsync".
> 
> Not eurodates per se.  There should be a postgresql.conf option for
> DateStyle, which'd allow you to set what you want.  Not sure why it's
> not there already :-(
> 

Added to TODO:
* Add GUC parameter for eurodates

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026