Re: useless LIMIT_OPTION_DEFAULT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: useless LIMIT_OPTION_DEFAULT
Дата
Msg-id 2828941.1702590425@sss.pgh.pa.us
обсуждение исходный текст
Ответ на useless LIMIT_OPTION_DEFAULT  (Zhang Mingli <zmlpostgres@gmail.com>)
Ответы Re: useless LIMIT_OPTION_DEFAULT  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Zhang Mingli <zmlpostgres@gmail.com> writes:
> By reading the codes, I found that we process limit option as LIMIT_OPTION_WITH_TIES when using WITH TIES
> and all others are LIMIT_OPTION_COUNT by  commit 357889eb17bb9c9336c4f324ceb1651da616fe57.
> And check actual limit node in limit_needed().
> There is no need to maintain a useless default limit enum.

I agree, that looks pretty useless.  Our normal convention for
representing not having any LIMIT clause would be to not create
a SelectLimit node at all.  I don't see why allowing a second
representation is a good idea, especially when the code is not
in fact doing that.

git blame shows that this came in with 357889eb1.  Alvaro,
Surafel, do you want to argue for keeping things as-is?

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Teach predtest about IS [NOT] proofs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Simplify newNode()