Re: Patch: plan invalidation vs stored procedures

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas OSB sIT
Тема Re: Patch: plan invalidation vs stored procedures
Дата
Msg-id 6DAFE8F5425AB84DB3FCA4537D829A561CD14761DC@M0164.s-mxs.net
обсуждение исходный текст
Ответ на Re: Patch: plan invalidation vs stored procedures  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> > Changing statement result type is also currently prohibited in
> > StorePreparedStatement. There maybe good reasons for this,
>
> How about "the SQL spec says so"?

Prepare time is often also the time when you bind the result, or more
generally set up the code to handle the result.

Generally I argue, that a mode of operation must exist where a change in
return type throws an error, so the client can readjust to the change.

We are only allowed to silently replan when it is clear that
the caller is agnostic to the change.
e.g. because the caller only accesses explicit columns of the return type/result set,
or does not supply a new parameter with a default, (or because he set some
parameter that tells us he can cope).

Certainly a new prepare must be able to cope with the change though,
which currently does not seem to be the case when an SP calls another
one that was dropped (and recreated)?

Andreas


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

Предыдущее
От: Abhijit Menon-Sen
Дата:
Сообщение: [PATCH] allow has_table_privilege(..., 'usage') on sequences
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Parsing of pg_hba.conf and authentication inconsistencies