Re: pl/pgsql docs 37.4.3. Row Types -- how do I use this

Поиск
Список
Период
Сортировка
От Jim Wilson
Тема Re: pl/pgsql docs 37.4.3. Row Types -- how do I use this
Дата
Msg-id twig.1074969216.8270@kelcomaine.com
обсуждение исходный текст
Ответ на Re: pl/pgsql docs 37.4.3. Row Types -- how do I use this  ("Lee Harr" <missive@hotmail.com>)
Список pgsql-general
Lee Harr <missive@hotmail.com> said:

> >Unless your function parameter is an integer you must quote it... eq:
> >
> >select use_two_tables('tablename');
> >
>
> Hrm... That does not work either:
>
> # select use_two_tables('tablename');
> ERROR:  function use_two_tables("unknown") does not exist
> HINT:  No function matches the given name and argument types. You may need
> to add explicit type casts.
> # select use_two_tables('tablename'::text);
> ERROR:  function use_two_tables(text) does not exist
> HINT:  No function matches the given name and argument types. You may need
> to add explicit type casts.

Why not just use a text type in your definition?

CREATE or REPLACE FUNCTION use_two_tables(text) RETURNS text AS ...

You can always do a cast inside the procedure if you need to.

Best regards,

Jim Wilson


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

Предыдущее
От: "Lee Harr"
Дата:
Сообщение: Re: pl/pgsql docs 37.4.3. Row Types -- how do I use this
Следующее
От: "Lee Harr"
Дата:
Сообщение: Re: pl/pgsql docs 37.4.3. Row Types -- how do I use this