troubles with datestyle

From: Herbert Liechti <Herbert(dot)Liechti(at)thinx(dot)ch>
To: postgres <pgsql-general(at)postgreSQL(dot)org>
Subject: troubles with datestyle
Date: 1999-11-12 15:01:31
Message-ID: 382C2BCB.59D22E12@thinx.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

Is there a way to select by date in format which is language independent.

select name, ....., date from table
where date >= '1-1-1999' and date <= '11-1-1999';

I use the Perl DBI und Postgres DBD driver. In the begin of the session
I set the datestyle variable to the current user language (german or us).
I loose this setting when I set the datestyle to 'german'. When I
do a

select name, ....., date from table
where date >= '1.1.1999' and date <= '1.11.1999';

the resultset is from january first to january 11 instead to the first of
november.

Any hints?
Herbie

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Herbert Liechti E-Mail: Herbert(dot)Liechti(at)thinx(dot)ch
ThinX networked business services Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Elrick 1999-11-13 02:10:03 Composite Keys
Previous Message Bob Kline 1999-11-12 14:58:01 Re: [GENERAL] troubles with datestyle