pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feednon-us datestyle
9+ messages / 5 participants
[nested] [flat]
* non-us datestyle
@ 2001-07-04 12:52 Cedar Cox <cedarc@visionforisrael.com>
2001-07-04 14:41 ` RE: non-us datestyle Oscar Serrano <oserra@fondos.net>
2001-07-04 15:56 ` Re: non-us datestyle Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 9+ messages in thread
From: Cedar Cox @ 2001-07-04 12:52 UTC (permalink / raw)
To: pgsql-interfaces
Is there a way to set the default date style to non-US (European)? I
didn't see any compile or run time options, just per connection options.
(pg v1.7)
-Cedar
^ permalink raw reply [nested|flat] 9+ messages in thread
* RE: non-us datestyle
2001-07-04 12:52 non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
@ 2001-07-04 14:41 ` Oscar Serrano <oserra@fondos.net>
2001-07-04 14:48 ` RE: non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
1 sibling, 1 reply; 9+ messages in thread
From: Oscar Serrano @ 2001-07-04 14:41 UTC (permalink / raw)
To: Cedar Cox <cedarc@visionforisrael.com>; pgsql-interfaces
> -----Mensaje original-----
> De: pgsql-interfaces-owner@postgresql.org
> [mailto:pgsql-interfaces-owner@postgresql.org]En nombre de Cedar Cox
> Enviado el: miercoles, 04 de julio de 2001 14:53
> Para: pgsql-interfaces@postgresql.org
> Asunto: [INTERFACES] non-us datestyle
>
>
>
> Is there a way to set the default date style to non-US (European)? I
> didn't see any compile or run time options, just per connection options.
> (pg v1.7)
>
> -Cedar
Well I'm not sure if you are asking for this but...
If you define the shell variable PGDATESTYLE to, for example, SQL, all date
are returned like this:
dd/mm/yyyy
There are serveral values you can assign to PGDATESTYLE.
You can execute, prior to a query this sentence:
SET DATESTYLE TO SQL
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* RE: non-us datestyle
2001-07-04 12:52 non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
2001-07-04 14:41 ` RE: non-us datestyle Oscar Serrano <oserra@fondos.net>
@ 2001-07-04 14:48 ` Cedar Cox <cedarc@visionforisrael.com>
2001-07-04 15:18 ` RE: non-us datestyle Oscar Serrano <oserra@fondos.net>
2001-07-04 15:22 ` Re: non-us datestyle Hannu Krosing <hannu@tm.ee>
0 siblings, 2 replies; 9+ messages in thread
From: Cedar Cox @ 2001-07-04 14:48 UTC (permalink / raw)
To: Oscar Serrano <oserra@fondos.net>; +Cc: pgsql-interfaces
On Wed, 4 Jul 2001, Oscar Serrano wrote:
>
> > -----Mensaje original-----
> > De: pgsql-interfaces-owner@postgresql.org
> > [mailto:pgsql-interfaces-owner@postgresql.org]En nombre de Cedar Cox
> > Enviado el: miercoles, 04 de julio de 2001 14:53
> > Para: pgsql-interfaces@postgresql.org
> > Asunto: [INTERFACES] non-us datestyle
> >
> > Is there a way to set the default date style to non-US (European)? I
> > didn't see any compile or run time options, just per connection options.
> > (pg v1.7)
> >
> > -Cedar
>
> Well I'm not sure if you are asking for this but...
> If you define the shell variable PGDATESTYLE to, for example, SQL, all date
> are returned like this:
> dd/mm/yyyy
> There are serveral values you can assign to PGDATESTYLE.
> You can execute, prior to a query this sentence:
> SET DATESTYLE TO SQL
I'll be using ODBC so there's no shell variable to set... This is why I
want a global option.
-Cedar
^ permalink raw reply [nested|flat] 9+ messages in thread
* RE: non-us datestyle
2001-07-04 12:52 non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
2001-07-04 14:41 ` RE: non-us datestyle Oscar Serrano <oserra@fondos.net>
2001-07-04 14:48 ` RE: non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
@ 2001-07-04 15:18 ` Oscar Serrano <oserra@fondos.net>
1 sibling, 0 replies; 9+ messages in thread
From: Oscar Serrano @ 2001-07-04 15:18 UTC (permalink / raw)
To: Cedar Cox <cedarc@visionforisrael.com>; +Cc: pgsql-interfaces
> -----Mensaje original-----
> De: Cedar Cox [mailto:cedarc@visionforisrael.com]
> Enviado el: miercoles, 04 de julio de 2001 16:48
> Para: Oscar Serrano
> CC: pgsql-interfaces@postgresql.org
> Asunto: RE: [INTERFACES] non-us datestyle
>
>
>
> On Wed, 4 Jul 2001, Oscar Serrano wrote:
> >
> > > -----Mensaje original-----
> > > De: pgsql-interfaces-owner@postgresql.org
> > > [mailto:pgsql-interfaces-owner@postgresql.org]En nombre de Cedar Cox
> > > Enviado el: miercoles, 04 de julio de 2001 14:53
> > > Para: pgsql-interfaces@postgresql.org
> > > Asunto: [INTERFACES] non-us datestyle
> > >
> > > Is there a way to set the default date style to non-US (European)? I
> > > didn't see any compile or run time options, just per
> connection options.
> > > (pg v1.7)
> > >
> > > -Cedar
> >
> > Well I'm not sure if you are asking for this but...
> > If you define the shell variable PGDATESTYLE to, for example,
> SQL, all date
> > are returned like this:
> > dd/mm/yyyy
> > There are serveral values you can assign to PGDATESTYLE.
> > You can execute, prior to a query this sentence:
> > SET DATESTYLE TO SQL
>
> I'll be using ODBC so there's no shell variable to set... This is why I
> want a global option.
But, have you tried it?
Beacuse I use DBI from a windows machine with ActivePerl and it works.
Oscar Serrano.
> -Cedar
>
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: non-us datestyle
2001-07-04 12:52 non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
2001-07-04 14:41 ` RE: non-us datestyle Oscar Serrano <oserra@fondos.net>
2001-07-04 14:48 ` RE: non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
@ 2001-07-04 15:22 ` Hannu Krosing <hannu@tm.ee>
1 sibling, 0 replies; 9+ messages in thread
From: Hannu Krosing @ 2001-07-04 15:22 UTC (permalink / raw)
To: Cedar Cox <cedarc@visionforisrael.com>; +Cc: Oscar Serrano <oserra@fondos.net>; pgsql-interfaces
Cedar Cox wrote:
>
> On Wed, 4 Jul 2001, Oscar Serrano wrote:
> >
> > > -----Mensaje original-----
> > > De: pgsql-interfaces-owner@postgresql.org
> > > [mailto:pgsql-interfaces-owner@postgresql.org]En nombre de Cedar Cox
> > > Enviado el: miercoles, 04 de julio de 2001 14:53
> > > Para: pgsql-interfaces@postgresql.org
> > > Asunto: [INTERFACES] non-us datestyle
> > >
> > > Is there a way to set the default date style to non-US (European)? I
> > > didn't see any compile or run time options, just per connection options.
> > > (pg v1.7)
> > >
> > > -Cedar
> >
> > Well I'm not sure if you are asking for this but...
> > If you define the shell variable PGDATESTYLE to, for example, SQL, all date
> > are returned like this:
> > dd/mm/yyyy
> > There are serveral values you can assign to PGDATESTYLE.
> > You can execute, prior to a query this sentence:
> > SET DATESTYLE TO SQL
>
> I'll be using ODBC so there's no shell variable to set... This is why I
> want a global option.
IIRC, ODBC driver allows you to specify a set of queries to run right
after connect.
You can put your SET DATESTYLE TO XXX; there
----------------
Hannu
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: non-us datestyle
2001-07-04 12:52 non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
@ 2001-07-04 15:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-07-04 16:43 ` RE: non-us datestyle Oscar Serrano <oserra@fondos.net>
2001-07-04 23:15 ` Re: non-us datestyle Hiroshi Inoue <Inoue@tpf.co.jp>
2001-07-05 08:34 ` Re: non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
1 sibling, 3 replies; 9+ messages in thread
From: Tom Lane @ 2001-07-04 15:56 UTC (permalink / raw)
To: Cedar Cox <cedarc@visionforisrael.com>; +Cc: pgsql-interfaces
Cedar Cox <cedarc@visionforisrael.com> writes:
> Is there a way to set the default date style to non-US (European)?
You can set PGDATESTYLE in the postmaster's environment, I think.
This should be a GUC variable (hence settable in postgresql.conf)
but isn't yet.
regards, tom lane
^ permalink raw reply [nested|flat] 9+ messages in thread
* RE: non-us datestyle
2001-07-04 12:52 non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
2001-07-04 15:56 ` Re: non-us datestyle Tom Lane <tgl@sss.pgh.pa.us>
@ 2001-07-04 16:43 ` Oscar Serrano <oserra@fondos.net>
2 siblings, 0 replies; 9+ messages in thread
From: Oscar Serrano @ 2001-07-04 16:43 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Cedar Cox <cedarc@visionforisrael.com>; +Cc: pgsql-interfaces
> -----Mensaje original-----
> De: pgsql-interfaces-owner@postgresql.org
> [mailto:pgsql-interfaces-owner@postgresql.org]En nombre de Tom Lane
> Enviado el: miƩrcoles, 04 de julio de 2001 17:56
> Para: Cedar Cox
> CC: pgsql-interfaces@postgresql.org
> Asunto: Re: [INTERFACES] non-us datestyle
>
>
> Cedar Cox <cedarc@visionforisrael.com> writes:
> > Is there a way to set the default date style to non-US (European)?
>
> You can set PGDATESTYLE in the postmaster's environment, I think.
>
> This should be a GUC variable (hence settable in postgresql.conf)
> but isn't yet.
I've seen that we stat postmaster with this options:
postmaster -D /mypath -i -o '-e -S 32768' &
The -o options means the parameters we pass to every postgres child. so,
the -e option in the postgres executable means "European dates".
Oscar Serrano.
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: non-us datestyle
2001-07-04 12:52 non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
2001-07-04 15:56 ` Re: non-us datestyle Tom Lane <tgl@sss.pgh.pa.us>
@ 2001-07-04 23:15 ` Hiroshi Inoue <Inoue@tpf.co.jp>
2 siblings, 0 replies; 9+ messages in thread
From: Hiroshi Inoue @ 2001-07-04 23:15 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Cedar Cox <cedarc@visionforisrael.com>; pgsql-interfaces
Tom Lane wrote:
>
> Cedar Cox <cedarc@visionforisrael.com> writes:
> > Is there a way to set the default date style to non-US (European)?
>
> You can set PGDATESTYLE in the postmaster's environment, I think.
>
> This should be a GUC variable (hence settable in postgresql.conf)
> but isn't yet.
>
psqlodbc driver seems to set the DateStyle for itself in
interfaces/odbc/connection.c.
/* Set the Datestyle to the format the driver expects it to be in */
result = SQLExecDirect(hstmt, "set DateStyle to 'ISO'", SQL_NTS);
regards,
Hiroshi Inoue
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: non-us datestyle
2001-07-04 12:52 non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
2001-07-04 15:56 ` Re: non-us datestyle Tom Lane <tgl@sss.pgh.pa.us>
@ 2001-07-05 08:34 ` Cedar Cox <cedarc@visionforisrael.com>
2 siblings, 0 replies; 9+ messages in thread
From: Cedar Cox @ 2001-07-05 08:34 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-interfaces; pgsql-odbc@postgresql.org
On Wed, 4 Jul 2001, Tom Lane wrote:
> Cedar Cox <cedarc@visionforisrael.com> writes:
> > Is there a way to set the default date style to non-US (European)?
>
> You can set PGDATESTYLE in the postmaster's environment, I think.
>
> This should be a GUC variable (hence settable in postgresql.conf)
> but isn't yet.
>
> regards, tom lane
I assume this is in a todo or already done?
FYI, for what we need we actually don't need to set the datestyle. If you
go through ODBC (Win/Access), it will take the system's regional settings
and use those (for display and input). Anyway, thanks for the answers.
BTW, is there a header file or something simple to change to default
everything to European so we don't have to worry about postmaster options?
-Cedar
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2001-07-05 08:34 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-07-04 12:52 non-us datestyle Cedar Cox <cedarc@visionforisrael.com>
2001-07-04 14:41 ` Oscar Serrano <oserra@fondos.net>
2001-07-04 14:48 ` Cedar Cox <cedarc@visionforisrael.com>
2001-07-04 15:18 ` Oscar Serrano <oserra@fondos.net>
2001-07-04 15:22 ` Hannu Krosing <hannu@tm.ee>
2001-07-04 15:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-07-04 16:43 ` Oscar Serrano <oserra@fondos.net>
2001-07-04 23:15 ` Hiroshi Inoue <Inoue@tpf.co.jp>
2001-07-05 08:34 ` Cedar Cox <cedarc@visionforisrael.com>
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