From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathalie Boulos <nathalieboulos@hotmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: default value
Date: Thu, 12 Jun 2003 09:47:25 -0400
Message-ID: <29435.1055425645@sss.pgh.pa.us> (raw)
In-Reply-To: <BAY8-F114QUUBPcZi7100007374@hotmail.com>
References: <BAY8-F114QUUBPcZi7100007374@hotmail.com>
"Nathalie Boulos" <nathalieboulos@hotmail.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, nathalieboulos@hotmail.com
Subject: Re: default value
In-Reply-To: <29435.1055425645@sss.pgh.pa.us>
References: <BAY8-F114QUUBPcZi7100007374@hotmail.com> <29435.1055425645@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox