X-Original-To: pgsql-bugs-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 8F9259DCD4B; Thu, 23 Mar 2006 09:30:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 28840-06; Thu, 23 Mar 2006 09:30:34 -0400 (AST) X-Greylist: whitelisted by SQLgrey- X-Greylist: whitelisted by SQLgrey- Received: from smtp-out-2002.amazon.com (smtp-out-2002.amazon.com [207.171.160.38]) by postgresql.org (Postfix) with ESMTP id 108629DCCE9; Thu, 23 Mar 2006 09:30:28 -0400 (AST) X-Amazon-Corporate-Relay: smtp-out-2002.iad2.amazon.com X-AMAZON-TRACK: pgsql-sql@postgresql.org Received: from smtp-in-0102.sea3.amazon.com by smtp-out-2002.amazon.com with ESMTP (peer crosscheck: smtp-in-0102.sea3.amazon.com) Received: from exchg-sea3-03.ant.amazon.com (exchg-sea3-03.sea3.amazon.com [172.20.12.31]) by smtp-in-0102.sea3.amazon.com (8.12.10/8.12.10) with ESMTP id k2NDUTa1019674; Thu, 23 Mar 2006 13:30:29 GMT X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: [SQL] Function Parameters in GROUP BY clause cause errors Date: Thu, 23 Mar 2006 05:30:28 -0800 Message-ID: <8333C841129E074E9F83FC80676BA76E405230@exchg-sea3-03.ant.amazon.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] Function Parameters in GROUP BY clause cause errors Thread-Index: AcZOMg6H7o2giLsRSjOim1UjNGRLGgASvV+w From: "Davidson, Robert" To: "Tom Lane" Cc: , X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.119 required=5 tests=[AWL=0.119] X-Spam-Score: 0.119 X-Spam-Level: X-Archive-Number: 200603/197 X-Sequence-Number: 14683 How amazing is that? I call it a night and come back to find that a bug = has been identified and patched while I sleep. When will it appear in the binaries (I see that the release version is = still 8.1.3)? I thought about trying to compile from source, but after = looking at the mingw page was too intimidated by figuring out what to = download to try compiling source. Best Regards, Robert Davidson -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20 Sent: Wednesday, March 22, 2006 8:27 PM To: Davidson, Robert Cc: pgsql-sql@postgresql.org; pgsql-bugs@postgresql.org Subject: Re: [SQL] Function Parameters in GROUP BY clause cause errors=20 I wrote: > Hmm, this seems like a plpgsql deficiency. It feels it can generate a > separate parameter symbol ($n) for each occurrence of each variable it > passes into a SQL query. But for this query to be legal, the two > instances of IntervalMinutes have to be represented by the *same* > parameter symbol (notice they are not in the regurgitated query). > It would be more efficient anyway to not generate multiple parameters > for the same value, so we oughta fix this. Patch applied to HEAD and 8.1 branches. regards, tom lane