Re: default value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nathalie Boulos" <nathalieboulos(at)hotmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: default value
Date: 2003-06-12 13:47:25
Message-ID: 29435.1055425645@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Nathalie Boulos" <nathalieboulos(at)hotmail(dot)com> writes:
> When i insert a value into a field in the table directly, all the other
> fields take their default values normaly, but the problem is if i insert
> into the rule and not into the table, all the fields who has default values
> do not take them. those fields remains empty.
> So the default value does not work if i insert into a rule ???

A rule has its own defaults --- set them with ALTER TABLE rule SET DEFAULT.

(IIRC this works since about 7.2; it won't work on old Postgresen.)

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-06-12 13:48:59 Re: triggers to foreign keys
Previous Message Stef 2003-06-12 13:12:37 triggers to foreign keys