Re: Updatable Views - DEFAULT doesn't inherit from table???

From: Richard Huxton <dev(at)archonet(dot)com>
To: Csaba Együd <csegyud(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Updatable Views - DEFAULT doesn't inherit from table???
Date: 2008-12-05 13:52:36
Message-ID: 49393224.7080301@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Csaba Együd 2008-12-05 14:00:40 Re: Updatable Views - DEFAULT doesn't inherit from table???
Previous Message Grzegorz Jaśkiewicz 2008-12-05 13:49:33 Re: Updatable Views - DEFAULT doesn't inherit from table???