Re: Patch: plan invalidation vs stored procedures

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Patch: plan invalidation vs stored procedures
Дата
Msg-id 21372.1218081879@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Patch: plan invalidation vs stored procedures  (Martin Pihlak <martin.pihlak@gmail.com>)
Ответы Re: Patch: plan invalidation vs stored procedures  (Zeugswetter Andreas OSB sIT <Andreas.Zeugswetter@s-itsolutions.at>)
Re: Patch: plan invalidation vs stored procedures  (Martin Pihlak <martin.pihlak@gmail.com>)
Список pgsql-hackers
Martin Pihlak <martin.pihlak@gmail.com> writes:
> Changing statement result type is also currently prohibited in
> StorePreparedStatement. There maybe good reasons for this,

How about "the SQL spec says so"?

Admittedly, it's a bit of a jump from views to prepared statements,
but the spec is perfectly clear that altering a table doesn't alter
any views dependent on it: SQL99 11.11 <add column definition> saith
           NOTE 189 - The addition of a column to a table has no effect on           any existing <query expression>
includedin a view descriptor,           <triggered action> included in a trigger descriptor, or <search
condition>included in a constraint descriptor because any           implicit column references in these descriptor
elementsare           syntactically substituted by explicit column references under           the Syntax Rules of
Subclause7.11, "<query specification>".           Furthermore, by implication (from the lack of any General Rules
   to the contrary), the meaning of a column reference is never           retroactively changed by the addition of a
columnsubsequent           to the invocation of the <SQL schema statement> containing that           column reference.
 

and there was a comparable restriction in SQL92.  You'd need to make a
pretty strong argument why prepared statements should behave differently
from views to convince me that changing this is a good idea.
        regards, tom lane


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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: plan invalidation vs stored procedures
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: [PATCH] allow has_table_privilege(..., 'usage') on sequences