Re: SQL99 functions

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: SQL99 functions
Дата
Msg-id 3958AFF9.3FEECA64@alumni.caltech.edu
обсуждение исходный текст
Ответ на SQL99 functions  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Ответы Re: SQL99 functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> > I see mention in SQL99 of function definitions which can have IN, 
> > OUT, and INOUT arguments. Any thoughts on how this could be 
> > supported in Postgres?
> I noticed that but haven't quite figured out how it's supposed to fit
> into the SQL worldview at all.  Surely
>         SELECT foo(x) FROM table
> shouldn't silently mutate into an UPDATE depending on how foo() is
> declared.  Exactly where is a function with OUT args useful in SQL?
 create table t1 (x int); create function foo (out int) returns int as ...; select foo(x) from t1;

will give two columns for the result.
 create function foo (inout int) returns int as ...; select foo(x) from t1;

will mutate the result, but not the underlying stored value of t1.x.

Beware, I haven't yet confirmed this by reading ;)
                    - Thomas


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

Предыдущее
От: Philip Warner
Дата:
Сообщение: Mailing List Archive Problem?
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: SQL99 functions