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

Поиск
Список
Период
Сортировка
От Aleksey Dashevsky
Тема Re: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2)
Дата
Msg-id Pine.LNX.3.96.SK.980826101241.30103A-100000@kesha.luckynet.co.il
обсуждение исходный текст
Ответ на Set DATESTYLE='ISO' (Postgres 6.3.2)  ("Sangeeta Rao" <Sangeeta_Rao@mw.3com.com>)
Список 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 по дате отправления:

Предыдущее
От: "John J. Boris, Sr."
Дата:
Сообщение: new odbc fails
Следующее
От: Sferacarta Software
Дата:
Сообщение: Re[2]: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2)