Re: Recent updates

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: Recent updates
Дата
Msg-id 35ACAB7D.9B5F1793@apop-server.alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: Recent updates  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: Recent updates  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
> > Yeah, it's sticky. Where in the code does the sorting get set up?
> 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.

OK, made a change to transformSortClause() called from
plan_union_queries():

postgres=> select null union select null;
?column?
--------

(1 row)

postgres=> select null union select null union all select null;
?column?
--------


(2 rows)

I decided to use the int4 sorting routines when the type is
"InvalidOid", the type apparently assigned to null constants. The sort
routines probably don't get called anyway since everything is a null,
and if they did the "pass by value" int4 routines are probably safest.

Will continue testing, and need to look into this still:

postgres=> select 1 union select null union all select null;
Backend message type 0x44 arrived while idle
...

                          - Tom

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: Re: [INTERFACES][HACKERS] atttypmod now 32 bits, interface change
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [INTERFACES][HACKERS] atttypmod now 32 bits, interface change