CHAR vs TEXT args

Поиск
Список
Период
Сортировка
От david_shadovitz@xontech.com (David Shadovitz)
Тема CHAR vs TEXT args
Дата
Msg-id 8b37e2e5.0308270908.bb390df@posting.google.com
обсуждение исходный текст
Ответы Re: CHAR vs TEXT args
Re: CHAR vs TEXT args
Список pgsql-general
I've created two PL/pgSQL functions with the same name and different
signatures:

CREATE FUNCTION ABC(CHAR) ...
CREATE FUNCTION ABC(TEXT) ....

I intended to call the CHAR-signature function like this:
SELECT ABC('R');

And the TEXT-signature function like this:
SELECT ABC('Right');

But I found that both calls invoke the TEXT-signature function.  So is
there any distinction between CHAR and TEXT?  Can I somehow specify
that the argument 'R' is to be treated as a CHAR, so the
CHAR-signature version of ABC is executed?

Thanks.
-David

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: The ..... worm
Следующее
От: "Kuldeep Tanna"
Дата:
Сообщение: Problem compiling tablefunc module in contributions