git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d8d5cb)
GROUP BY can only infer functional dependency from non-deferrable primary keys.
Sun, 5 Sep 2010 15:45:42 +0000 (15:45 +0000)
Sun, 5 Sep 2010 15:45:42 +0000 (15:45 +0000)
Peter's original patch had this right, but I dropped the check while revising
the code to search pg_constraint instead of pg_index. Spotted by Dean Rasheed.


diff --git a/src/backend/catalog/pg_constraint.c b/src/backend/catalog/pg_constraint.c
index 106b8df6e4c6563aa736ae24a47daea720605ee0..42d7d6caca08a167adf6d98b6ba04318047b9ac3 100644 (file)
--- a/src/backend/catalog/pg_constraint.c
+++ b/src/backend/catalog/pg_constraint.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/catalog/pg_constraint.c,v 1.55 2010年08月07日 02:44:06 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/catalog/pg_constraint.c,v 1.56 2010年09月05日 15:45:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -836,6 +836,9 @@ check_functional_grouping(Oid relid,
/* Only PK constraints are of interest for now, see comment above */
if (con->contype != CONSTRAINT_PRIMARY)
continue;
+ /* Constraint must be non-deferrable */
+ if (con->condeferrable)
+ continue;
/* Extract the conkey array, ie, attnums of PK's columns */
adatum = heap_getattr(tuple, Anum_pg_constraint_conkey,
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /