From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mario Becroft <pgsql@becroft.co.nz>
Cc: pgsql-sql@postgresql.org
Subject: Re: Using rules to implement backward-compatible schema changes
Date: Tue, 01 Jan 2008 02:09:18 -0500
Message-ID: <13418.1199171358@sss.pgh.pa.us> (raw)
In-Reply-To: <873atit7od.fsf@server.ak.quickcircuit.co.nz>
References: <873atit7od.fsf@server.ak.quickcircuit.co.nz>
Mario Becroft <pgsql@becroft.co.nz> writes:
> The problem is that when inserting to the view, default values do not
> work as expected.
You need to attach the defaults to the view, viz
ALTER TABLE a ALTER COLUMN bar SET DEFAULT 5;
This is considered a feature not a bug, since you might want a
different default for inserts to the view than for inserts
directly to the underlying table.
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql@becroft.co.nz
Subject: Re: Using rules to implement backward-compatible schema changes
In-Reply-To: <13418.1199171358@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