Re: Using rules to implement backward-compatible schema changes - Mailing list pgsql-sql

From Tom Lane
Subject Re: Using rules to implement backward-compatible schema changes
Date
Msg-id 13418.1199171358@sss.pgh.pa.us
Whole thread Raw
In response to Using rules to implement backward-compatible schema changes  (Mario Becroft <pgsql@becroft.co.nz>)
Responses Re: Using rules to implement backward-compatible schema changes
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Mario Becroft
Date:
Subject: Using rules to implement backward-compatible schema changes
Next
From: Mario Becroft
Date:
Subject: Re: Using rules to implement backward-compatible schema changes