Re: Support prepared statement invalidation when result types change
| От | Tom Lane |
|---|---|
| Тема | Re: Support prepared statement invalidation when result types change |
| Дата | |
| Msg-id | 1238027.1721835596@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Support prepared statement invalidation when result types change (Jelte Fennema <me@jeltef.nl>) |
| Ответы |
Re: Support prepared statement invalidation when result types change
|
| Список | pgsql-hackers |
Jelte Fennema <me@jeltef.nl> writes:
> The cached plan for a prepared statements can get invalidated when DDL
> changes the tables used in the query, or when search_path changes.
> ...
> However, we would throw an error if the the result of the query is of a
> different type than it was before:
> ERROR: cached plan must not change result type
Yes, this is intentional.
> This patch starts to allow a prepared statement to continue to work even
> when the result type changes.
What this is is a wire protocol break. What if the client has
previously done a Describe Statement on the prepared statement?
We have no mechanism for notifying it that that information is
now falsified. The error is thrown to prevent us from getting
into a situation where we'd need to do that.
regards, tom lane
В списке pgsql-hackers по дате отправления: