Re: [HACKERS] GROUP BY fixes committed

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] GROUP BY fixes committed
Дата
Msg-id 199905101833.OAA04816@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] GROUP BY fixes committed  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> ACCEPTED:
> insert into si_tmpVerifyAccountBalances select invoiceid+3,
> memberid, 1, TotShippingHandling from InvoiceLineDetails
> group by invoiceid+3, memberid;
> 
> NOT ACCEPTED:
> insert into si_tmpVerifyAccountBalances select invoiceid+3,
> memberid, 1, TotShippingHandling from InvoiceLineDetails
> group by invoiceid+3, memberid, TotShippingHandling;
> 
> Probably error check is including GROUP BY targets in its count of
> things-to-be-inserted :-(.  The behavior is quite inconsistent though.
> Also, why doesn't the first example get rejected, since
> TotShippingHandling is neither GROUP BY nor an aggregate??

Yikes.  We check to make sure all non-agg columns are referenced in
GROUP BY, but not that all GROUP BY's are in target list, perhaps?

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: jwieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] numeric & decimal
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Lost my mailbox