Обсуждение: Postgres DateStyle

Поиск
Список
Период
Сортировка

Postgres DateStyle

От
"Ing. Roberto Andrade Fonseca"
Дата:
Hi:

The documentation of Postgresql 7.0.2 says that the statement:

SET DATESTYLE TO 'Postgres';

would led to an output of the form:

Wed Dec 17 07:37:16 1997 PST

but I can't reproduce this behavior!!!

What am I doing wrong?

Saludos,

Roberto Andrade Fonseca
randrade@abl.com.mx


Re: Postgres DateStyle

От
Thomas Lockhart
Дата:
(My mailer was fouled up; I had sent this a few days ago...)

> > The documentation of Postgresql 7.0.2 says that the statement:
> > SET DATESTYLE TO 'Postgres';
> > would led to an output of the form:
> > Wed Dec 17 07:37:16 1997 PST
> > but I can't reproduce this behavior!!!
>
> lockhart=# select timestamp 'now';
>          ?column?
> ---------------------------
>  2000-07-11 15:48:24.00+00
> (1 row)
>
> lockhart=# set datestyle to 'Postgres';
> SET VARIABLE
> lockhart=# select timestamp 'now';
>             ?column?
> ---------------------------------
>  Tue Jul 11 15:48:35.00 2000 UTC
> (1 row)
>
> Please show a transcript of your session if you need some more
> suggestions.
>
>                   - Thomas

Re: Postgres DateStyle

От
"Ing. Roberto Andrade Fonseca"
Дата:
On Fri, 14 Jul 2000, Thomas Lockhart wrote:

> (My mailer was fouled up; I had sent this a few days ago...)
>
> > > The documentation of Postgresql 7.0.2 says that the statement:
> > > SET DATESTYLE TO 'Postgres';
> > > would led to an output of the form:
> > > Wed Dec 17 07:37:16 1997 PST
> > > but I can't reproduce this behavior!!!
> >
> > lockhart=# select timestamp 'now';
> >          ?column?
> > ---------------------------
> >  2000-07-11 15:48:24.00+00
> > (1 row)
> >
> > lockhart=# set datestyle to 'Postgres';
> > SET VARIABLE
> > lockhart=# select timestamp 'now';
> >             ?column?
> > ---------------------------------
> >  Tue Jul 11 15:48:35.00 2000 UTC
> > (1 row)
> >
> > Please show a transcript of your session if you need some more
> > suggestions.

Thanks Thomas:

I was doing something stupid: my data type was date, not timestamp. That explained
my error.

Saludos,

Roberto Andrade Fonseca
randrade@abl.com.mx