Re: using queries as default value?

Поиск
Список
Период
Сортировка
От Nabil Sayegh
Тема Re: using queries as default value?
Дата
Msg-id 1054333892.654.0.camel@billy
обсуждение исходный текст
Ответ на using queries as default value?  (Don Patou <pknoob@noos.fr>)
Список pgsql-novice
Am Sam, 2003-05-31 um 00.04 schrieb Don Patou:
> is it possible to have a query as a column default value. I have a statistic
> table and I would like one of its column to do like "select count(colx) from
> anothertable".
> What's the best way to do this?

Maybe what you want is a VIEW.
But that would always do the query _at runtime_, not while inserting.

HTH
--
 e-Trolley Sayegh & John, Nabil Sayegh
 Tel.: 0700 etrolley /// 0700 38765539
 Fax.: +49 69 8299381-8
 PGP : http://www.e-trolley.de


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: using queries as default value?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: using queries as default value?