Re: [PATCH] explain sortorder
От
Tom Lane
Тема
Re: [PATCH] explain sortorder
Дата
Msg-id
27093.1421683774@sss.pgh.pa.us
Ответ на
Re: [PATCH] explain sortorder (Timmer, Marius)
Список
Дерево обсуждения
Re: [PATCH] explain sortorder Arne Scheffer <arne.scheffer@uni-muenster.de>
Re: [PATCH] explain sortorder Mike Blackwell <mike.blackwell@rrd.com>
"Timmer, Marius" writes: > We think, you wanted to switch to DESC behavior > (print out NULLS FIRST) in cases, where > �USING� uses an operator which is considered to be > a DESC operator. Right, because that's how addTargetToSortList() would parse it. > But get_equality_op_for_ordering_op is called in > cases, where reverse is false, but > the part > if (reverse) > *reverse = (strategy == BTGreaterStrategyNumber); > never changes this to true? Sorry, not following? It's true that what I added to explain.c doesn't worry too much about the possibility of get_ordering_op_properties() failing --- that really shouldn't happen for something that was previously accepted as a sorting operator. But if it does, "reverse" will just be left as false, so the behavior will anyway be unsurprising I think. We could alternatively make it throw a "cache lookup failed" error but I'm not sure how that makes anyone's life better. regards, tom lane
В списке pgsql-hackers по дате отправления
От: Pavel Stehule
Дата: