Re: Functional dependencies and GROUP BY

Peter Eisentraut <peter_e@gmx.net>

From: Peter Eisentraut <peter_e@gmx.net>
To: Alex Hunsaker <badalex@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2010-07-17T10:15:18Z
Lists: pgsql-hackers
On fre, 2010-07-16 at 22:29 -0600, Alex Hunsaker wrote:
> The only corner case I have run into is creating a view with what I
> would call an implicit 'not null' constraint.  Demonstration below:
> 
> create table nn (a int4 not null, b int4, unique (a));
> select * from nn group by a; -- should this work? I think not? 

I believe I referred to this upsthread.  There is another patch in the
commitfest about explicitly representing NOT NULL constraints in
pg_constraint.  Then this case would create a dependency on those
constraints.  So we need to get that other patch in first.