Overloading '<' operator

Поиск
Список
Период
Сортировка
От trisuresh@yahoo.co.in (Suresh Tri)
Тема Overloading '<' operator
Дата
Msg-id a8de98e.0408310518.34dd3915@posting.google.com
обсуждение исходный текст
Ответы Re: Overloading '<' operator  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
Hi all,
 I was trying to overload '<' operator for (varchar,varchar). But  in
the function which handles the comparision I want to use the previous
'<' operator.. but it is going into a recursion.

My simplified code looks like :

create or replace function orastringcmp (varchar, varchar) returns
boolean as
'declare
        firstarg        alias for $1;
        secondarg       alias for $2;
begin
        return firstarg < secondarg;
end;
'language 'plpgsql';

create operator < (
        procedure = orastringcmp,
        leftarg = varchar,
        rightarg = varchar
);

Can any one tell how to use the previous version of ooperator while
overloading one. Are there any material online which gives the
detailed description of operator overloading? ( i could not find much
information apart from CREATE OPERATOR documentation )

Thanks,
Abhiman

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

Предыдущее
От: "Raymond O'Donnell"
Дата:
Сообщение: Re: European dates with Win32 version
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Overloading '<' operator