Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D64642E351A for ; Tue, 1 Jan 2008 03:09:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 43076-05 for ; Tue, 1 Jan 2008 03:09:26 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A15D02E3520 for ; Tue, 1 Jan 2008 03:09:27 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id m0179I6m013419; Tue, 1 Jan 2008 02:09:18 -0500 (EST) To: Mario Becroft cc: pgsql-sql@postgresql.org Subject: Re: Using rules to implement backward-compatible schema changes In-reply-to: <873atit7od.fsf@server.ak.quickcircuit.co.nz> References: <873atit7od.fsf@server.ak.quickcircuit.co.nz> Comments: In-reply-to Mario Becroft message dated "Tue, 01 Jan 2008 18:51:30 +1300" Date: Tue, 01 Jan 2008 02:09:18 -0500 Message-ID: <13418.1199171358@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/3 X-Sequence-Number: 29857 Mario Becroft 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