[HACKERS] Re: [QUESTIONS] BUG: aggregate functions and @ operator.
[HACKERS] Re: [QUESTIONS] BUG: aggregate functions and @ operator.
От:
"Thomas G. Lockhart" <Thomas.Lockhart@jpl.nasa.gov>
Дата:
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! tgl=> explain verbose select sum(@a) from test\g PQexec() -- Request was sent to backend, but backend closed the channel before responding. This probably means the backend terminated abnormally before or while processing the request. btw, "\h explain" is out of date. I *think* that the new syntax is "explain [verbose] ..." and will update the help file if you would like me to... All testing was on a 970610 snapshot. - Tom ------------------------------
Re: [HACKERS] Re: [QUESTIONS] BUG: aggregate functions and @ operator.
От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> > 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 the TODO list on the WWW page. > btw, "\h explain" is out of date. I *think* that the new syntax is > "explain [verbose] ..." and will update the help file if you would like > me to... Thank you. I have fixed this in the CVS tree. This fix will be in 6.1 final. - -- Bruce Momjian maillist@candle.pha.pa.us ------------------------------
Re: [HACKERS] Re: [QUESTIONS] BUG: aggregate functions and @ operator.
От:
"Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>
Дата:
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
------------------------------Re: [HACKERS] Re: [QUESTIONS] BUG: aggregate functions and @ operator.
От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> > > 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. Removed from TODO list on WWW page. - -- Bruce Momjian maillist@candle.pha.pa.us ------------------------------
Re: [HACKERS] Re: [QUESTIONS] BUG: aggregate functions and @ operator.
От:
"Marc G. Fournier" <scrappy@hub.org>
Дата:
On Thu, 12 Jun 1997, Bruce Momjian wrote: > > > > 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. > > Removed from TODO list on WWW page. And some ppl think we arent' responsive to bugs *roll eyes* *grin* Marc G. Fournier scrappy@hub.org Systems Administrator @ hub.org scrappy@freebsd.org ------------------------------