Constraints of view attributes

From: <51183341(at)gmx(dot)at>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Constraints of view attributes
Date: 2017-05-11 19:24:28
Message-ID: 20170511212428.59073fe1@florenz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

create table t1 (f1 text not null);
create table t2 (f2 text);
create view v as (select t1.f1, t2.f2 from t1, t2);

Given v, How can a find out the t1.f1 has a not null constraint.
I can easily find this for t1 in the system catalog, but not for v.
I learned on IRC today that this should be somewhere in pg_rewrite but
where exactly and how do I get this information? Parse rewrite
query_tree? How?

--
Greg

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-05-11 19:55:31 Re: Constraints of view attributes
Previous Message Tom Lane 2017-05-11 17:52:21 Re: How to recover my postgres database ?