Re: Case Insensitive comparison

Поиск
Список
Период
Сортировка
От George A.J
Тема Re: Case Insensitive comparison
Дата
Msg-id 20030925140407.64555.qmail@web14908.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Case Insensitive comparison  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql

Thanks to all of you for your valuable suggesstions....
does postgresql internally uses the = operator(text,text) for any other purposes.
i think that overloading it solves the index problem too...
 
 

Tom Lane <tgl@sss.pgh.pa.us> wrote:
Josh Berkus writes:
>> How can i create a function that accept and return any type. the type "any"
>> is not allowing as parameter or return type. Is it possible? i want to
>> create a function similar to NULLIF().

> You can't, nor will you be able to -- in te future, some 7.4 functions will be
> able to *accept* any type, but they will still return a specific type.

Au contraire. The 7.4 polymorphic-function features may well solve
jinujose's problem, if he can indeed write a type-independent function
body. For example

create function nullif(anyelement, anyelement) returns anyelement as
'select case when $1 = $2 then null else $1 end' language sql;

I'm not sure we're all the way there yet, cf
http://archives.postgresql.org/pgsql-general/2003-09/msg00500.php

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Case Insensitive comparison
Следующее
От: BenLaKnet
Дата:
Сообщение: [pg-sql] Character encoding