[HACKERS] bug in prepared statements, alter table 8.3

2008-08-07 Thread Merlin Moncure
postgres=# create table abc (a int, b int); CREATE TABLE Time: 492.417 ms postgres=# insert into abc values (1,2); INSERT 0 1 Time: 16.602 ms postgres=# prepare ins_abc as insert into abc values(1,2); PREPARE Time: 0.248 ms postgres=# alter table abc alter a type numeric; ALTER TABLE Time: 254.847

Re: [HACKERS] bug in prepared statements, alter table 8.3

2008-08-07 Thread Andrew Gierth
Merlin == Merlin Moncure [EMAIL PROTECTED] writes: Merlin postgres=# alter table abc alter a type numeric; Merlin ALTER TABLE Merlin Time: 254.847 ms Merlin postgres=# EXECUTE ins_abc; Merlin INSERT 0 1 Merlin Time: 0.452 ms Merlin postgres=# select * from abc; Merlin ERROR: invalid

Re: [HACKERS] bug in prepared statements, alter table 8.3

2008-08-07 Thread Tom Lane
Andrew Gierth [EMAIL PROTECTED] writes: This is fairly obviously a simple consequence of the lack of plan invalidation, it just happens to be more serious than most Hmm, we plugged the correspoding hole on the SELECT side awhile back, but it seems that INSERT/UPDATE may need some defenses too.