From: Ulf Mehlig <umehlig@uni-bremen.de>
To: eg@tzv.fal.de
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Bug in sortin routine?
Date: Tue, 9 Mar 1999 09:38:58 +0100
Message-ID: <199903090838.JAA01608@pandora3.uni-bremen.de> (raw)
In-Reply-To: <9903090816180D.00675@salo.tzv.fal.de>
References: <9903090816180D.00675@salo.tzv.fal.de>
Eilert Groeneveld <eg@tzv.fal.de> wrote:
> [...] It seems that the sorting order on dates is incorrect under
> certain circumstances: [...] set DateStyle to 'German'; (does not
> have an effect on the problem) [...]
From the examples you gave it appears that you are still using
American date format (YYYY-MM-DD); if that is true, the lines are
ordered as they should be. If some of the date values appear to be
"correct" after manual/visual control and others not, you maybe have
inserted some of the values with American, others with German format
in use, resulting in a messed up table (and you'll have to fix it by
hand). Are you sure you've really set DateStyle correctly? I have
something like
PGDATESTYLE=German
export PGDATESTYLE
in my shell's .bashrc, and selecting some date values from one of my
tables gives e.g.
datum
----------
16.08.1996
17.08.1996
18.08.1996
19.08.1996
20.08.1996
that is, DD.MM.YYYY (for testing, dates with 'day' after the 12th of
the month are better suited than the others ;-). If you set
PGDATESTYLE like I did, are you sure the configuration file got
source'd? You can test the state of DateStyle with
xxx=> show datestyle;
NOTICE: DateStyle is German with European conventions
SHOW VARIABLE
from inside psql.
Hope it helps ...
viele Grüße,
Ulf
--
======================================================================
Ulf Mehlig <umehlig@zmt.uni-bremen.de>
Center for Tropical Marine Ecology/ZMT, Bremen, Germany
----------------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-interfaces@postgresql.org
Cc: umehlig@uni-bremen.de, eg@tzv.fal.de
Subject: Re: [INTERFACES] Bug in sortin routine?
In-Reply-To: <199903090838.JAA01608@pandora3.uni-bremen.de>
References: <9903090816180D.00675@salo.tzv.fal.de> <199903090838.JAA01608@pandora3.uni-bremen.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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