pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
set datestyle to European  PROBLEM
3+ messages / 3 participants
[nested] [flat]

* set datestyle to European  PROBLEM
@ 2001-06-15 07:59  Alessandro Rossi <alex@sunrise.radiostudiodelta.it>
  0 siblings, 2 replies; 3+ messages in thread

From: Alessandro Rossi @ 2001-06-15 07:59 UTC (permalink / raw)
  To: pgsql-sql


I have the defaul installation of postgres 7.0.3 and on another machine
7.1.2 on redhat 7.1

I cannont get the date in correct form:

dbme=# select data_ar from equipment limit 5;
  data_ar   
------------
 2001-11-05
 2001-05-17
 2001-05-28
 2001-05-28
 2001-05-22
(5 rows)

then:

dbme=# set datestyle to European;
SET VARIABLE

dbme=# select data_ar from equipment limit 5;
  data_ar
------------
 2001-11-05
 2001-05-17
 2001-05-28
 2001-05-28
 2001-05-22
(5 rows)

Is this a bug ?

I think i should get dd-mm-yyy date format and not yyyy-mm-dd 



Is postgres using ISO date format as default ?

Thanks

Alex





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

* Re: set datestyle to European  PROBLEM
@ 2001-06-20 19:23  George Moga <george@dsn.ro>
  parent: Alessandro Rossi <alex@sunrise.radiostudiodelta.it>
  1 sibling, 0 replies; 3+ messages in thread

From: George Moga @ 2001-06-20 19:23 UTC (permalink / raw)
  To: Alessandro Rossi <alex@sunrise.radiostudiodelta.it>; pgsql-sql

Alessandro Rossi wrote:

> I have the defaul installation of postgres 7.0.3 and on another machine
> 7.1.2 on redhat 7.1
>
> I cannont get the date in correct form:

.....

> Is this a bug ?
>
> I think i should get dd-mm-yyy date format and not yyyy-mm-dd
>
> Is postgres using ISO date format as default ?

I had the same problem ... but I solved ...
(I use PostgreSQL 7.1 on RH 7.1 installed from rpm):

In "/etc/rc.d/init.d/postgresql" I modify in "start" arm ... from:
su -l postgres -c "LC_ALL=C /usr/bin/pg_ctl -D $PGDATA -p
/usr/bin/postmaster start >/dev/null 2>&1" < /dev/null

to

su -l postgres -c "LC_ALL=C /usr/bin/pg_ctl -D $PGDATA -o '-i -o -e' -p
/usr/bin/postmaster start >/dev/null 2>&1" < /dev/null

and, after I connect my application to the database, the first command is:

SET DATESTYLE TO 'Postgres';

and work fine ...


> Thanks

> Alex

George Moga,
    Data Systems Srl,
    Slobozia, ROMANIA





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

* Re: set datestyle to European  PROBLEM
@ 2001-06-21 09:06  Roelof Sondaar <roelof.sondaar@wmdata.nl>
  parent: Alessandro Rossi <alex@sunrise.radiostudiodelta.it>
  1 sibling, 0 replies; 3+ messages in thread

From: Roelof Sondaar @ 2001-06-21 09:06 UTC (permalink / raw)
  To: pgsql-sql

Hello Alessandro,

The manual I have says the following about Date/Time Styles:
- 4 styles (ISO-8601, SQL, Postgres, German)
The one which resembles your layout is German.
I looked it up in Bruce Momjians book.

Best regards,
Roelof


Alessandro Rossi schreef:
> 
> I have the defaul installation of postgres 7.0.3 and on another machine
> 7.1.2 on redhat 7.1
> 
> I cannont get the date in correct form:
> 
> dbme=# select data_ar from equipment limit 5;
>   data_ar
> ------------
>  2001-11-05
>  2001-05-17
>  2001-05-28
>  2001-05-28
>  2001-05-22
> (5 rows)
> 
> then:
> 
> dbme=# set datestyle to European;
> SET VARIABLE
> 
> dbme=# select data_ar from equipment limit 5;
>   data_ar
> ------------
>  2001-11-05
>  2001-05-17
>  2001-05-28
>  2001-05-28
>  2001-05-22
> (5 rows)
> 
> Is this a bug ?
> 
> I think i should get dd-mm-yyy date format and not yyyy-mm-dd
> 
> Is postgres using ISO date format as default ?
> 
> Thanks
> 
> Alex
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

-- 
Roelof Sondaar
WM-data Zwolle B.V.
Russenweg 5
P O Box 391
8000 AJ  ZWOLLE
The Netherlands

E-mail:	roelof.sondaar@wmdata.nl
Telephone:+31(0)384 977 366
Fax:	+31(0)384 977 600
WWW:	www.wmdata.nl

*******************************************************
Disclaimer

This email is confidential and intended solely for the use of
the individual to whom it is addressed. Any views or opinions
presented are solely those of the author and do not
necessarily represent those of WM-data Zwolle B.V.
If you are not the intended recipient, be advised that you
have received this email in error and that any use,
dissemination, forwarding, printing or copying of this email
is strictly prohibited.

If you have received this email in error please notify
WM-data Zwolle B.V.  Helpdesk by telephone on
+31(0)384 977 319
*******************************************************



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


end of thread, other threads:[~2001-06-21 09:06 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-15 07:59 set datestyle to European  PROBLEM Alessandro Rossi <alex@sunrise.radiostudiodelta.it>
2001-06-20 19:23 ` George Moga <george@dsn.ro>
2001-06-21 09:06 ` Roelof Sondaar <roelof.sondaar@wmdata.nl>

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