Datatypes in PL/PSQL functions with multiple arguments

Поиск
Список
Период
Сортировка
От Benjamin Holmberg
Тема Datatypes in PL/PSQL functions with multiple arguments
Дата
Msg-id bb9c4f0f050419080132ca8286@mail.gmail.com
обсуждение исходный текст
Ответы Re: Datatypes in PL/PSQL functions with multiple arguments  (Richard Huxton <dev@archonet.com>)
Re: Datatypes in PL/PSQL functions with multiple arguments  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Hello-

  This is my first foray into pl/psql so forgive me if I sound totally incompetent.

  I've been writing a few functions, and have come across some screwing data typing issues.

  When creating a function which accepts a single argument, things work just fine, variable can be used throughout the function as expected with no modification.
  When creating functions containing two or more arguments, I have to explicity cast the arguments whenever I use them (loading/casting into another variable is an option, haven't tried though) to prevent runtime errors.  The functions get called just fine, but then run into problems using any of the given arguments.

  Has anyone had any experience with this?  Please advise!

Thanks!
Benjamin

select version();
                                                version
--------------------------------------------------------------------------------------------------------
 PostgreSQL 7.4.7 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: substring and POSIX re's
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Datatypes in PL/PSQL functions with multiple arguments