pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Set DATESTYLE='ISO' (Postgres 6.3.2)
2+ messages / 2 participants
[nested] [flat]

* Set DATESTYLE='ISO' (Postgres 6.3.2)
@ 1998-08-24 21:41 Sangeeta Rao <Sangeeta_Rao@mw.3com.com>
  1998-08-26 07:22 ` Re: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2) Aleksey Dashevsky <postgres@luckynet.co.il>
  0 siblings, 1 reply; 2+ messages in thread

From: Sangeeta Rao @ 1998-08-24 21:41 UTC (permalink / raw)
  To: pgsql-general@postgresql.org; 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










^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [GENERAL] Set DATESTYLE='ISO' (Postgres 6.3.2)
  1998-08-24 21:41 Set DATESTYLE='ISO' (Postgres 6.3.2) Sangeeta Rao <Sangeeta_Rao@mw.3com.com>
@ 1998-08-26 07:22 ` Aleksey Dashevsky <postgres@luckynet.co.il>
  0 siblings, 0 replies; 2+ messages in thread

From: Aleksey Dashevsky @ 1998-08-26 07:22 UTC (permalink / raw)
  To: Sangeeta Rao <Sangeeta_Rao@mw.3com.com>; +Cc: pgsql-general@postgreSQL.org; 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.






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1998-08-26 07:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-08-24 21:41 Set DATESTYLE='ISO' (Postgres 6.3.2) Sangeeta Rao <Sangeeta_Rao@mw.3com.com>
1998-08-26 07:22 ` Aleksey Dashevsky <postgres@luckynet.co.il>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox