Re: [HACKERS] Re: [QUESTIONS] BUG: aggregate functions and @ operator. - Mailing list pgsql-hackers

From Vadim B. Mikheev
Subject Re: [HACKERS] Re: [QUESTIONS] BUG: aggregate functions and @ operator.
Date
Msg-id 53bd7f42eb9a02f4405f7ed6260841df
Whole thread Raw
In response to [HACKERS] Re: [QUESTIONS] BUG: aggregate functions and @ operator.  ("Thomas G. Lockhart" <Thomas.Lockhart@jpl.nasa.gov>)
List pgsql-hackers
Bruce Momjian wrote:
>
> >
> > I was cleaning out old mail and found this posting, which I started
> > looking into. Looks like a parser problem, or something in that area,
> > rather than a data type problem. Still present in v6.1. Bruce or Vadim
> > or ??, do you have any ideas on this?
> >
> > >> I think I found a bug in PostgreSQL v6.0. Whenever I try to use an
> > >> aggregate function (tested with sum, avg and min) whith an absolute value
> > >> (@ operator) in the formula, the backend crashes.
> >
> > Here is a test case:
> > create table test ( a float4);
> > insert into test values ( 2 );
> > select @(a) from test;         (OK)
> > select sum(a) from test;       (OK)
> > select sum(@a) from test;      (Backend crash)
> >
> > But, even an "explain" crashes the backend!
>
> Gee, I never remember seeing this bug report before.  I have added it to
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
And I'm so.

> the TODO list on the WWW page.

Don't it - it's fixed now: it's case of an unary operator, but
replace_agg_clause() always tried set references for both left and right
operands - so check for is an operand NULL or not added.

Vadim

------------------------------

pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: [HACKERS] Re: [QUESTIONS] BUG: aggregate functions and @ operator.
Next
From: Michael Reifenberger
Date:
Subject: Re: [HACKERS] FATAL 1:btree: items are out of order