Re: Feedback about Drupal SQL debugging

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Feedback about Drupal SQL debugging
Дата
Msg-id 4A8F300C.9090706@dunslane.net
обсуждение исходный текст
Ответ на Re: Feedback about Drupal SQL debugging  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers

Greg Stark wrote:
> If Postgres changed on this front it would be to support the SQL
> Standard concept of "functional dependency". In cases where some
> columns are guaranteed to be unique you can leave them out of the
> GROUP BY but still use them in the select list. This isn't MySQL's
> behaviour of just allowing you to leave them out and hope that it
> doesn't matter which row's values are used. The database has to
> actually determine that it really doesn't matter. Typically that would
> be because you've grouped by a set of columns which form the key of a
> unique constraint, in which case every other column from that table
> would also necessarily be the same since they would all come from the
> same row of that table.
>
>   

That would make much more sense.

You can also get the effect of picking an arbitrary row now by use 
max(column) or min(column) in place of the straight column.

cheers

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Feedback about Drupal SQL debugging
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Feedback about Drupal SQL debugging