From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: juerg.rietmann@pup.ch
Cc: pgsql-sql@postgresql.org
Subject: Re: function text_ge(text, text), how to use on version 7.2
Date: Tue, 18 Jun 2002 16:24:56 +0300 (EEST)
Message-ID: <Pine.LNX.4.44.0206181614350.1943-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <OF53592563.9772177E-ONC1256BDC.0042AB83-C1256BDC.0042ABBE@pup.ch>
On Tue, 18 Jun 2002 juerg.rietmann@pup.ch wrote:
> Hello there
>
> I use the function text_ge(text, text) under version 7.03 and it was just
> fine. After upgrading to version 7.2 this function doesn't work anymore.
It is quite possible that text_ge uses local encodings.
However I think it is working fine, but it is unwise to use strings
for dates representation.
You could use timestamps with resolution to milisecond
(which means storing actual UNIX dates), or dates.
What you do with text_ge is a lexicographical comparison of the two texts.
Hence, this method will produce different results for different encodings,
and thus it is not portable.
i'd say convert the 'DD-MM-YYYY' ul_datum fields with the correct SQL
dates, or timestamps, and then use normal date comparison <,>,=.
>
> this statement shows all the records even if the greatest year is 2002 in
> ul_datum :
> select * from userlog where text_ge(ul_datum, '01.01.2004')
>
> Thanks in advance ... Juerg Rietmann
>
>
>
> __________________________________________________
>
> PFISTER + PARTNER, SYSTEM - ENGINEERING AG
> Juerg Rietmann
> Grundstrasse 22a
> 6343 Rotkreuz
> Switzerland
>
> internet : www.pup.ch
> phone : +4141 790 4040
> fax : +4141 790 2545
> mobile : +4179 211 0315
> __________________________________________________
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
--
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel: +30-10-8981112
fax: +30-10-8981877
email: achill@matrix.gatewaynet.com
mantzios@softlab.ece.ntua.gr
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-sql@postgresql.org
Cc: achill@matrix.gatewaynet.com, juerg.rietmann@pup.ch
Subject: Re: function text_ge(text, text), how to use on version 7.2
In-Reply-To: <Pine.LNX.4.44.0206181614350.1943-100000@matrix.gatewaynet.com>
References: <OF53592563.9772177E-ONC1256BDC.0042AB83-C1256BDC.0042ABBE@pup.ch> <Pine.LNX.4.44.0206181614350.1943-100000@matrix.gatewaynet.com>
* 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