Re: Updatable Views - DEFAULT doesn't inherit from table??? - Mailing list pgsql-general

From Csaba Együd
Subject Re: Updatable Views - DEFAULT doesn't inherit from table???
Date
Msg-id ghbc65$umn$1@news.hub.org
Whole thread Raw
In response to Re: Updatable Views - DEFAULT doesn't inherit from table???  (Richard Huxton <dev@archonet.com>)
Responses Re: Updatable Views - DEFAULT doesn't inherit from table???
List pgsql-general
"Richard Huxton" <dev@archonet.com> a következőket írta üzenetében
news:49393224.7080301@archonet.com...
Csaba Együd wrote:
> Hi,
> I have problems with inserting rows into an updatable view through it's
> insert rule.
[snip]
> But in the table definition I defined DEFULT=(-1) for this field. What's
> going wrong? Shouldn't it inherit these settings from the table?

Maybe, but it doesn't (and I think I've seen someone arguing it
shouldn't). You can manually apply constraints/defaults etc. to the view
though. I can't recall if you do ALTER VIEW view_products_1 or ALTER
TABLE view_products_1, but it's one of them.


--
  Richard Huxton
  Archonet Ltd


Richard,
Thx for your reply. Is there any possible way to generate an sql to "copy"
these defaults to the view.
--Csaba


pgsql-general by date:

Previous
From: "William Temperley"
Date:
Subject: in transaction - safest way to kill
Next
From: Csaba Együd
Date:
Subject: Re: Updatable Views - DEFAULT doesn't inherit from table???