Re: Column defaults fail with rules on view - Mailing list pgsql-general

From Tom Lane
Subject Re: Column defaults fail with rules on view
Date
Msg-id 20936.1063986819@sss.pgh.pa.us
Whole thread Raw
In response to Re: Column defaults fail with rules on view  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Richard Huxton <dev@archonet.com> writes:
> On Friday 19 September 2003 16:04, Tom Lane wrote:
>> What Berend actually wants is to attach column defaults to the *view*,
>> so that they apply to an INSERT mentioning the view.  You can do this in
>> recent PG releases (7.3 for sure, not sure about 7.2) using ALTER TABLE
>> ... ADD DEFAULT.

> Am I right in thinking that *in theory* we should be able to "inherit" the
> defaults to the view automatically?

[shrug]  Maybe, in simple cases.  I'm not convinced it'd be especially
useful.  The defaults applicable to direct inserts into a table aren't
necessarily sensible for inserts via a view.

            regards, tom lane

pgsql-general by date:

Previous
From: dschmidt@lexmark.com
Date:
Subject:
Next
From: "scott.marlowe"
Date:
Subject: Re: Rockets (was Re: PostgreSQL versus MySQL)