Re: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2) - Mailing list pgsql-interfaces

From Aleksey Dashevsky
Subject Re: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2)
Date
Msg-id Pine.LNX.3.96.SK.980826101241.30103A-100000@kesha.luckynet.co.il
Whole thread Raw
In response to Set DATESTYLE='ISO' (Postgres 6.3.2)  ("Sangeeta Rao" <Sangeeta_Rao@mw.3com.com>)
List 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.




pgsql-interfaces by date:

Previous
From: "John J. Boris, Sr."
Date:
Subject: new odbc fails
Next
From: Sferacarta Software
Date:
Subject: Re[2]: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2)