Re: Properly pathify the union planner

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Properly pathify the union planner
Дата
Msg-id 3704835.1711655619@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Properly pathify the union planner  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Properly pathify the union planner  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers
I wrote:
> David Rowley <dgrowleyml@gmail.com> writes:
>> Maybe something with "Parameters" in the name?

> SubqueryParameters might be OK.  Or SubqueryPlannerExtra?
> Since this is a bespoke struct that will probably only ever
> be used with subquery_planner, naming it after that function
> seems like a good idea.

On third thought, I'm not at all convinced that we even want to
invent this struct as compared to just adding another parameter
to subquery_planner.  The problem with a struct is what happens
the next time we need to add a parameter?  If we add yet another
function parameter, we can count on the compiler to complain
about call sites that didn't get the memo.  Adding a field
within an existing struct provokes no such warning, leading
to situations with uninitialized fields that might accidentally
work during testing, but fail the minute they get to the field.

If you do want to go this direction, a minimum safety requirement
would be to have an ironclad rule that callers memset the whole
struct to zero before filling it, so that any not-set fields
will at least have predictable values.  But I don't see the
point really.

            regards, tom lane



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

Предыдущее
От: Melih Mutlu
Дата:
Сообщение: Re: Flushing large data immediately in pqcomm
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Possibility to disable `ALTER SYSTEM`