Re: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2)

From: Aleksey Dashevsky <postgres(at)luckynet(dot)co(dot)il>
To: Sangeeta Rao <Sangeeta_Rao(at)mw(dot)3com(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org, pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2)
Date: 1998-08-26 07:22:47
Message-ID: Pine.LNX.3.96.SK.980826101241.30103A-100000@kesha.luckynet.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces


On Mon, 24 Aug 1998, Sangeeta Rao wrote:

>
> Hi,
>
> I am using Postgresql 6.3.2 and would like to set the datestyle to be ISO.
>
> Here is what I did:
>
> - issued "set datestyle='ISO' " using PQexec() after opening a connection
> with the database. (no errors)
> - Then checked the datestyle from psql
> dbxxx=> show datestyle ;
> response:
> NOTICE: DateStyle is Postgres with US (NonEuropean) conventions.
> - Also, when I open a jdbc connection with debug tracing on I notice that
> the datestyle is Postgres
>
> Why so?? Is this a bug or am I missing something?
>
> Instead of issuing 'set datestyle' command if I set the environment
> variable
> 'PGDATESTYLE' to ISO it works fine but I would like to avoid having to do
> this.

Setting datestyle variable has effect only for the session it was issued
in. It was made so to avoid interfernce with another sessions since
they could be started not only by you, but someone else (remember --
PostgreSQL is multiusear). So, the solution is to run postmaster with
"-e" turned on to get the datestyle you need by default-- for details
check manpages postmaster(1) and postgres(1).

Aleksey.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gilles Darold 1998-08-26 08:53:48 Option -i !!
Previous Message Vadim Mikheev 1998-08-26 03:07:52 Re: [GENERAL] TRANSACTION ISOLATION

Browse pgsql-interfaces by date

  From Date Subject
Next Message Sferacarta Software 1998-08-26 11:27:50 Re[2]: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2)
Previous Message John J. Boris, Sr. 1998-08-26 03:16:07 new odbc fails