prepare-alter-exec issue

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: prepare-alter-exec issue
Date: 2006-03-03 06:35:25
Message-ID: du8o9n$ibl$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I encounter a server(8.1.1) problem like this:

create table tt(id int);
prepare p1(int) as insert into tt values($1);
execute p1(3);
alter table tt alter id type char(10);
execute p1(9999999);
select * from tt;
^ server core dumps here

Command "execute p1(9999999)" works because the prepared plan still treat
9999999 as an integer, but "select * from tt" causes core dump because it
treats the attribute as type varlena char - so 9999999 becomes the varlen.

This might be a known issue, but seems not mentioned in the document:
http://www.postgresql.org/docs/current/static/sql-prepare.html

Regards,
Qingqing

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Qingqing Zhou 2006-03-03 06:45:52 Re: BUG #2296: select query error.
Previous Message NAKANO Yoshihisa 2006-03-03 04:34:26 Re: BUG #2096: bug in a SPI sample document