Re: Column Default Clause and User Defined Functions

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Column Default Clause and User Defined Functions
Дата
Msg-id BC501E55-34E3-4F3A-B2F6-C116DDA38196@seespotcode.net
обсуждение исходный текст
Ответ на Column Default Clause and User Defined Functions  (Keary Suska <hierophant@pcisys.net>)
Ответы Re: Column Default Clause and User Defined Functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Jun 27, 2007, at 18:18 , Keary Suska wrote:

> Is it possible to have a user-defined function (a plpqsql function)
> as the
> argument to a default clause that issues SELECTs on other tables?

Not according to the documentation:

http://www.postgresql.org/docs/8.2/interactive/sql-createtable.html

> DEFAULT default_expr
>
>     The DEFAULT clause assigns a default data value for the column
> whose column definition it appears within. The value is any
> variable-free expression (subqueries and cross-references to other
> columns in the current table are not allowed). The data type of the
> default expression must match the data type of the column.
>
>     The default expression will be used in any insert operation
> that does not specify a value for the column. If there is no
> default for a column, then the default is null.


Michael Glaesemann
grzm seespotcode net



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

Предыдущее
От: "Eddy D. Sanchez"
Дата:
Сообщение: Image Archiving with postgres
Следующее
От: "Danyelle Gragsone"
Дата:
Сообщение: Re: postgres and webmin