Re: [HACKERS] don't know whether nodes of type 719 are equal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: t-ishii(at)sra(dot)co(dot)jp
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] don't know whether nodes of type 719 are equal
Date: 1999-10-18 05:10:56
Message-ID: 22180.940223456@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> writes:
>> I also got this message with UNION and distinct.
>> I've tested 6.5.2 and 6.5.3. Current (6.6 or 7.0 ?) works fine

> Me too. Current works fine, but 6.5.2 not.

No, it's still there in current:

regression=> explain select distinct * from tenk1
regression-> union select distinct * from tenk1;
NOTICE: equal: don't know whether nodes of type 719 are equal
NOTICE: QUERY PLAN:
... etc ...

It might be a little harder to get in current. I think that in
a fit of code beautification I rearranged _equalQuery so that the
sort/group clauses are tested later than they used to be. You
won't see this notice if _equalQuery discovers that the query
nodes are non-identical before it gets to the sort specification.
Thus:

regression=> explain select distinct * from tenk1 t1
regression-> union select distinct * from tenk1 t2;
NOTICE: QUERY PLAN:
... etc ...

This entirely equivalent query has different refnames in the rangetables
of the two subselects, which means equal() considers the nodes
non-identical; and the rangetable is checked by equalQuery before it
gets to the sort clause. So the sort clauses are never compared.
Bingo, no message.

Being harder to get doesn't make it any less a bug, of course.
But I'm not especially concerned about it --- the query works,
the message is just noise; so I think we can live with it until
we get around to doing the major querytree redesign that we need
to do for subselects in FROM as well as some less pressing problems
like this one...

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 1999-10-18 05:40:47 RE: [HACKERS] mdnblocks is an amazing time sink in huge relations
Previous Message Bruce Momjian 1999-10-18 04:25:19 Re: [HACKERS] don't know whether nodes of type 719 are equal