Re: function text_ge(text, text), how to use on version 7.2

Поиск
Список
Период
Сортировка
От Achilleus Mantzios
Тема Re: function text_ge(text, text), how to use on version 7.2
Дата
Msg-id Pine.LNX.4.44.0206181614350.1943-100000@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на function text_ge(text, text), how to use on version 7.2  (juerg.rietmann@pup.ch)
Список pgsql-sql
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



В списке pgsql-sql по дате отправления:

Предыдущее
От: juerg.rietmann@pup.ch
Дата:
Сообщение: function text_ge(text, text), how to use on version 7.2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Request for builtin function: Double_quote