Re: A query that doesn't work on 7.1
От | Tom Lane |
---|---|
Тема | Re: A query that doesn't work on 7.1 |
Дата | |
Msg-id | 24466.984016499@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: A query that doesn't work on 7.1 (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-sql |
>> Here's a query that doesn't work on 7.1. Is this a bug or am I doing >> something wrong? > Hmm, I think you have found some subtle bugs in aggregate processing; > offhand it seems like both these queries should be legal. I'll see what > I can do about it. Not so subtle after all :-(. Curious that no one noticed this before. Here's the patch if you need it right away... regards, tom lane *** src/backend/optimizer/util/clauses.c.orig Mon Feb 12 20:26:43 2001 --- src/backend/optimizer/util/clauses.c Wed Mar 7 20:49:01 2001 *************** *** 540,545 **** --- 540,553 ---- Query *context) { if (node == NULL) + return false; + + /* + * If we find an aggregate function, do not recurse into its + * arguments. Subplans invoked within aggregate calls are allowed + * to receive ungrouped variables. + */ + if (IsA(node, Aggref)) return false; /*
В списке pgsql-sql по дате отправления: