How to overload POSITION

Поиск
Список
Период
Сортировка
От Troels Arvin
Тема How to overload POSITION
Дата
Msg-id pan.2004.11.16.20.33.28.205138@arvin.dk
обсуждение исходный текст
Ответы Re: How to overload POSITION
Список pgsql-general
Hello,

I'm working on a datatype which I call dnaseq. The basic stuff like
input/output functions, comparison operators, etc., work well.

I have overloaded the CHARACTER_LENGTH function without problems:

CREATE OR REPLACE FUNCTION character_length(dnaseq)
RETURNS integer
AS 'dnaseq','dnaseq_charlen'
LANGUAGE 'C' IMMUTABLE STRICT;

Now, I want to overload the POSITION(lftval IN rgtval) function, but how
do I do that? I've tried

CREATE OR REPLACE FUNCTION position(dnaseq,dnaseq)
RETURNS integer
AS 'dnaseq'
LANGUAGE 'C' IMMUTABLE STRICT;

But now I get:
ERROR:  syntax error at or near "(" at character 36
LINE 1: CREATE OR REPLACE FUNCTION position(dnaseq,dnaseq)

I assume this is because the POSITION function uses "IN" to separate
arguments, in stead of a comma. Is there a way to overload it?

--
Greetings from Troels Arvin, Copenhagen, Denmark


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

Предыдущее
От: "Sim Zacks"
Дата:
Сообщение: Re: I'm about to release the next postgresql RFD.
Следующее
От: Bernd Helmle
Дата:
Сообщение: Re: Fwd: Problem installing Postgresql on MDK10.0