Re: Feedback about Drupal SQL debugging - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Feedback about Drupal SQL debugging
Date
Msg-id 14300.1250904189@sss.pgh.pa.us
Whole thread Raw
In response to Re: Feedback about Drupal SQL debugging  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Feedback about Drupal SQL debugging
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> Right.  It strikes me as a relativly small amount of work to get the
> initial "just add the columns to the group by" logic implemented.

Well, no, you *aren't* adding the columns to the GROUP BY.  You're just
not throwing the error.  You really don't want to add redundant columns
to GROUP BY because it makes more work for the planner and executor
(unless the planner can figure out they're redundant, which in itself
takes work).

This is a bit trickier than it looks because it makes the validity of a
query dependent on the existence of an appropriate uniqueness
constraint; thus for example DROP CONSTRAINT might invalidate a stored
rule or view.  See prior discussions.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: revised hstore patch
Next
From: Stephen Frost
Date:
Subject: Re: Feedback about Drupal SQL debugging