Set DATESTYLE='ISO' (Postgres 6.3.2) - Mailing list pgsql-interfaces

From Sangeeta Rao
Subject Set DATESTYLE='ISO' (Postgres 6.3.2)
Date
Msg-id 8625666A.00731387.00@mwgate02.mw.3com.com
Whole thread Raw
Responses Re: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2)
List pgsql-interfaces
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.
What do I need to do to get the sql command 'set datestyle' to work??
I appreciate any help.

Thank You,
SR








pgsql-interfaces by date:

Previous
From: "John Sharp"
Date:
Subject: postgresql for sparc 2.5.1?
Next
From: Tom Lane
Date:
Subject: Re: [INTERFACES] Re: [HACKERS] Convert PGconn, PGresult to opaque types?