Hello On 05/04/2008, Pedro Doria Meunier <pdoria@xxxxxxxxxxxxxx> wrote: > Hi, > > Is it possible to have a table's column default value set to some form of > select? > directly no, but you can use function postgres=# create table a(a integer); CREATE TABLE postgres=# create function mx() returns int as $$select max(a) from a$$ language sql volatile; CREATE FUNCTION postgres=# create table b(x integer default mx()); CREATE TABLE Regards Pavel Stehule > e.g. picking another table's value for a given SELECT ... WHERE ... > > Already thankful for any insight, > > -- > Pedro Doria Meunier > Ips. da Olaria, Edf. Jardins do Garajau, 4, r/c Y > 9125-162 Caniço > Madeira - Portugal > -------------------------------------------------- > Skype : pdoriam > Mobile: +351961720188 > >