Re: [HACKERS] ERROR: pull_var_clause: Cannot handle node type 108

From: José Soares <jose(at)sferacarta(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] ERROR: pull_var_clause: Cannot handle node type 108
Date: 1999-08-27 12:35:32
Message-ID: 37C68614.657B9ABB@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane ha scritto:

> =?iso-8859-1?Q?Jos=E9?= Soares <jose(at)sferacarta(dot)com> writes:
> > What does it mean?
> > prova=> select nome from prova group by nome having count(*) > 1;
> > [ OK ]
>
> > prova=> select oid,* from prova where nome in (select nome from prova
> > group by nome having 1 < count(*));
> > ERROR: pull_var_clause: Cannot handle node type 108
>
> > prova=> select * from prova where nome in (select nome from prova group
> > by nome having count(*) > 1);
> > ERROR: rewrite: aggregate column of view must be at rigth side in qual
>
> I take it you are using 6.4, because 6.5 generates different failure
> messages. But it's not any less broken :-(. The rewriter seems to have
> a bunch of bugs associated with aggregate functions in HAVING clauses of
> sub-selects. Or maybe it's just several manifestations of the same bug.
> I have notes about this problem but do not understand it well enough to
> fix it. Perhaps Jan has a clue about it...
>
> regards, tom lane

You are right Tom. I installed v6.5.1 and now the message is different, but I
can't understand it again:

hygea=> select nome from prova group by nome having 1<count(*);
nome
------
carlos
jose
(2 rows)

hygea=> select oid,nome from prova where nome in (select nome from prova
group by nome having 1<count(*));
ERROR: SELECT/HAVING requires aggregates to be valid

José

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-08-27 13:58:08 Re: [HACKERS] ERROR: pull_var_clause: Cannot handle node type 108
Previous Message Bruce Momjian 1999-08-26 18:39:07 PG FAQ in PDF format