permanent EuroDates

Started by Yury Bokhoncovichalmost 24 years ago6 messages
#1Yury Bokhoncovich
byg@center-f1.ru

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.

#2Oliver Elphick
olly@lfix.co.uk
In reply to: Yury Bokhoncovich (#1)
Re: permanent EuroDates

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 be poured into your lap. For with the same
measure that you use, it will be measured to
you." Luke 6:38

#3Yury Bokhoncovich
byg@center-f1.ru
In reply to: Oliver Elphick (#2)
Re: permanent EuroDates

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.

#4Oliver Elphick
olly@lfix.co.uk
In reply to: Yury Bokhoncovich (#3)
Re: permanent EuroDates

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 be poured into your lap. For with the same
measure that you use, it will be measured to
you." Luke 6:38

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Yury Bokhoncovich (#1)
Re: permanent EuroDates

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

#6Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#5)
Re: permanent EuroDates

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, Pennsylvania 19026