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

From: Csaba Együd <csegyud(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Updatable Views - DEFAULT doesn't inherit from table???
Date: 2008-12-05 14:38:59
Message-ID: ghbee0$27hv$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Richard Huxton" <dev(at)archonet(dot)com> a következőket írta üzenetében
news:49393A81(dot)3030702(at)archonet(dot)com(dot)(dot)(dot)
Csaba Együd wrote:
> Thx for your reply. Is there any possible way to generate an sql to
> "copy" these defaults to the view.

Nothing pre-packaged that I know of. You could probably do something
copying values about in pg_attribute and pg_constraint, but that'd be an
"at your own risk" sort of activity I suspect.

For simpler defaults etc. you could probably get what you need from
information_schema.columns

--
Richard Huxton
Archonet Ltd

--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Or use of coalesce() function???
I mean sg like:
..., qtyunitid = coalesce(NEW.qtyunitid, -1), ...
in the Rule def.

-- Csaba

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2008-12-05 14:42:32 Re: Updatable Views - DEFAULT doesn't inherit from table???
Previous Message Richard Huxton 2008-12-05 14:28:17 Re: Updatable Views - DEFAULT doesn't inherit from table???