Re: using queries as default value? - Mailing list pgsql-novice

From Nabil Sayegh
Subject Re: using queries as default value?
Date
Msg-id 1054333892.654.0.camel@billy
Whole thread Raw
In response to using queries as default value?  (Don Patou <pknoob@noos.fr>)
List 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 by date:

Previous
From: Josh Berkus
Date:
Subject: Re: using queries as default value?
Next
From: Tom Lane
Date:
Subject: Re: using queries as default value?