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

From Tom Lane
Subject Re: Feedback about Drupal SQL debugging
Date
Msg-id 25669.1250906107@sss.pgh.pa.us
Whole thread Raw
In response to Re: Feedback about Drupal SQL debugging  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> The first step is probably to do the opposite of what we're talking
> about here: cases where people *have* added extra columns to the GROUP
> BY key so they can use those columns in their select list. We can
> remove those columns from the sort or hash comparison key if there's a
> column (or columns) which is a unique constraint key for the same
> source. Similarly we can remove columns from an ORDER BY if the order
> key has earlier columns which are already a unique key for the same
> source.

This is something we could only do at plan time --- if we do it at parse
time we risk making a robust query into one that will break when
somebody drops a constraint.  So it's not really the inverse of the
other case.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Feedback about Drupal SQL debugging
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Feedback about Drupal SQL debugging