Обсуждение: SQL FUNCTION return type on INSERT

Поиск
Список
Период
Сортировка

SQL FUNCTION return type on INSERT

От
"Edward Grabczewski"
Дата:
What value should I RETURN for a SQL FUNCTION that contains an INSERT
statement?

--
Eddy Grabczewski
edward.grabczewski@btinternet.com





Re: SQL FUNCTION return type on INSERT

От
"Edward Grabczewski"
Дата:
I've just looked at the new online 7.2 documentation and found that all
functions must end in some kind of select.
How about this then?

CREATE FUNCTION foo(varchar)
RETURN unknown
AS '     INSERT INTO footable VALUES ($1);     SELECT null; '
LANGUAGE 'sql';

"Edward Grabczewski" <edward.grabczewski@btinternet.com> wrote in message
news:9s0n0p$1saj$1@news.tht.net...
> What value should I RETURN for a SQL FUNCTION that contains an INSERT
> statement?
>
> --
> Eddy Grabczewski
> edward.grabczewski@btinternet.com
>
>
>




Re: SQL FUNCTION return type on INSERT

От
"Josh Berkus"
Дата:
Eddy,

> What value should I RETURN for a SQL FUNCTION that contains an INSERT
> statement?

OPAQUE.

-Josh


______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco