diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-08-07 02:44:09 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-08-07 02:44:09 +0000 |
commit | e49ae8d3bc588294d07ce1a1272b31718cfca5ef (patch) | |
tree | e423c1f46141fc3ca5fd5746bce39cf74faf56b4 /src/backend/nodes/readfuncs.c | |
parent | ce6ce1a09dada095c07334d11eb56c5168ed801a (diff) |
Recognize functional dependency on primary keys. This allows a table's
other columns to be referenced without listing them in GROUP BY, so long as
the primary key column(s) are listed in GROUP BY.
Eventually we should also allow functional dependency on a UNIQUE constraint
when the columns are marked NOT NULL, but that has to wait until NOT NULL
constraints are represented in pg_constraint, because we need to have
pg_constraint OIDs for all the conditions needed to ensure functional
dependency.
Peter Eisentraut, reviewed by Alex Hunsaker and Tom Lane
Diffstat (limited to 'src/backend/nodes/readfuncs.c')
-rw-r--r-- | src/backend/nodes/readfuncs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index f28191d2d00..4d85d676979 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/readfuncs.c,v 1.232 2010/02/16 22:34:43 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/readfuncs.c,v 1.233 2010/08/07 02:44:07 tgl Exp $ * * NOTES * Path and Plan nodes do not have any readfuncs support, because we @@ -218,6 +218,7 @@ _readQuery(void) READ_NODE_FIELD(limitCount); READ_NODE_FIELD(rowMarks); READ_NODE_FIELD(setOperations); + READ_NODE_FIELD(constraintDeps); READ_DONE(); } |