Re: Recent updates

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: lockhart(at)alumnus(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: lockhart(at)alumni(dot)caltech(dot)edu, hackers(at)postgreSQL(dot)org
Subject: Re: Recent updates
Date: 1998-07-14 17:01:44
Message-ID: 199807141701.NAA25918@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > > Any ideas?
> > I knew there was a reason I did not support NULL in union. :-)
>
> Yeah, it's sticky. Where in the code does the sorting get set up?
>
> - Tom
>

See optimizer/prep/prepunion.c::plan_union_queries(). You will see me
calling transformSortClause() from there to set up a query using
UNION/UNION ALL. I think that is where the problem is happening.
Whatever you did in the parser to get these types converted is not in
that function. Can you check into it? Should I be doing that in
another place. I am unsure, but it looks like the best place for it.

I think the major problem is the way I am re-ordering the UNION sort to
handle the placement of UNION and UNION ALL. I think I need some more
code, or perhaps grab some structure you are already populating in the
parser in this place.

When I required all the types to be the same, it didn't matter how I
re-ordered things.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1998-07-14 17:48:41 EXPLAIN doesn't explain operations on inheritance trees
Previous Message Bruce Momjian 1998-07-14 15:37:17 Re: [HACKERS] atttypmod now 32 bits, interface change]