Thread: datestyle

datestyle

From
"Crombleholme, Roy"
Date:
Hi everyone,

Got a small problem with dates on postgresql.  if i connect to a database
and then run the command: SET datestyle to european;
The date gets set to ISO with european conventions but only for the current
session.  At the moment its default is ISO with US (non european)
conventions.

I need to be able to set the default to european.  I put datestyle =
european in the postgresql.conf file but postmaster complained about this
and would not start up.  Does anybody know the correct entry to achieve this
or a postmaster -c "command"

Many thanks

Roy Crombleholme
Trainee ICT Engineer
ICT Services
Resources Directorate
Lancashire County Council
01772 5-31849
Email:  roy.crombleholme@its.lancscc.gov.uk



********************
This e-mail contains information intended for the addressee only.
It may be confidential and may be the subject of legal and/or professional privilege.
If you are not the addressee you are not authorised to disseminate, distribute, copy or use this e-mail or any
attachmentto it 
The content may be personal or contain personal opinions and unless specifically stated or followed up in writing, the
contentcannot be taken to form a contract or to be an expression of the County Council's position. 
LCC reserves the right to monitor all incoming and outgoing email
LCC has taken reasonable steps to ensure that outgoing communications do not contain  malicious software and it is your
responsibilityto carry out any checks on this email before accepting the email and opening attachments. 
********************


Re: datestyle

From
Tom Lane
Date:
"Crombleholme, Roy" <Roy.Crombleholme@its.lancscc.gov.uk> writes:
> I need to be able to set the default to european.  I put datestyle =
> european in the postgresql.conf file but postmaster complained about this
> and would not start up.

That works in recent releases (7.3.*), but evidently you're running
something not so recent.  I think setting PGDATESTYLE in the
postmaster's environment will work, or add "-e" to the postmaster's
command line flags.  Or update to 7.3 ;-)

            regards, tom lane

Re: datestyle

From
Nabil Sayegh
Date:
Am Fre, 2003-05-16 um 11.00 schrieb Crombleholme, Roy:
> Hi everyone,
>
> Got a small problem with dates on postgresql.  if i connect to a database
> and then run the command: SET datestyle to european;
> The date gets set to ISO with european conventions but only for the current
> session.  At the moment its default is ISO with US (non european)
> conventions.
>
> I need to be able to set the default to european.  I put datestyle =
> european in the postgresql.conf file but postmaster complained about this
> and would not start up.  Does anybody know the correct entry to achieve this
> or a postmaster -c "command"

I do this in debian

/etc/init.d/postgresql

su - postgres -c "PGDATESTYLE=GERMAN /usr/lib/postgresql/bin/postgresql-startup"

HIH
--
 e-Trolley Sayegh & John, Nabil Sayegh
 Tel.: 0700 etrolley /// 0700 38765539
 Fax.: +49 69 8299381-8
 PGP : www.e-trolley.de