cnliou9@fastmail.fm writes:
> test=# CREATE TABLE x1 (c1 INTEGER);
> CREATE TABLE
> test=# PREPARE p1 AS SELECT * FROM x1;
> PREPARE
> (
> Run this SQL in another session:
> ALTER TABLE x1 ADD c2 TEXT;
> )
> test=# EXECUTE p1;
> ERROR: cached plan must not change result type
This behavior is intentional: it's to keep applications from having to
deal with the possibility that they prepare a statement, Describe it
to find out what columns it returns, and then when they actually execute
it, it returns some other column set.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs