From: | Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
---|---|
To: | juerg(dot)rietmann(at)pup(dot)ch |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: function text_ge(text, text), how to use on version 7.2 |
Date: | 2002-06-18 13:24:56 |
Message-ID: | Pine.LNX.4.44.0206181614350.1943-100000@matrix.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tue, 18 Jun 2002 juerg(dot)rietmann(at)pup(dot)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(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-06-18 14:48:53 | Re: Request for builtin function: Double_quote |
Previous Message | juerg.rietmann | 2002-06-18 12:08:13 | function text_ge(text, text), how to use on version 7.2 |