Re: datestyle

From: Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: datestyle
Date: 2001-06-04 10:31:22
Message-ID: 0106041331220L.19567@bugs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Lun 04 Jun 2001 12:54, you wrote:
> On Lun 04 Jun 2001 17:04, you wrote:
> > On Mon, Jun 04, 2001 at 10:00:16AM +0300, Mart?n Marqu?s wrote:
> > > Hi, I'm trying to set the datesyle in postgres to european (day before
> > > month). I'm starting postgres with pg_ctl with these options:
> > >
> > > pg_ctl -o "-i -o -e" -D /usr/local/pgsql/data/ start
> > >
> > > But when I select a date field I get this:
>
> [snip]
>
> > according to /usr/share/doc/postgresql-doc/html/user/sql-set.htm
> > (on debian, "apt-get install postgresql-doc" does the trick):
> >
> > SET -- Set run-time parameters for session
> >
> > SET variable { TO | = } { value | 'value' | DEFAULT }
>
> From the postgres manual!
>
> -e Sets the default date style to ``European'', which
> means that the ``day before month'' (rather than month
> before day) rule is used to interpret ambiguous date
> input, and that the day is printed before the month in
> certain date output formats. See the PostgreSQL User's
> Guide for more information.
>
> Now, this doesn't work with output dates?
>
> Isn't there a way to set this so that all the connection go in with the
> DATESTYLE=EUROPEAN?

More info:

pruebas=> SET DateStyle TO 'European';
SET VARIABLE
pruebas=> select * from pr_fecha;
fecha | horas
------------+----------
2001-12-25 |
2001-12-25 |
| 16:00:00
2001-03-13 |
(4 rows)

pruebas=>

Any ideas?

--
Cualquiera administra un NT.
Ese es el problema, que cualquiera administre.
-----------------------------------------------------------------
Martin Marques | mmarques(at)unl(dot)edu(dot)ar
Programador, Administrador | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Francesco Casadei 2001-06-04 10:48:51 Re: PostgreSQL security concerns
Previous Message Peter Eisentraut 2001-06-04 10:11:52 Re: Alternate database locations