Re: BUG #3403: ver 8.2 can't add serial column to temp table,but 8.1 can - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3403: ver 8.2 can't add serial column to temp table,but 8.1 can
Date
Msg-id 26172.1182543955@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #3403: ver 8.2 can't add serial column to temp table,but 8.1 can  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-bugs
Heikki Linnakangas <heikki@enterprisedb.com> writes:
> Tom Lane wrote:
>> IOW, we don't actually *know* at parse analysis time which table will be
>> affected.

> I don't understand that. Why would the execution be delayed to a future
> transaction? You can't PREPARE an ALTER TABLE, right?

Yeah, you can.  Consider plpgsql, or protocol-level Bind.  The fact that
we don't expose these facilities as SQL doesn't mean they're not there.
A cached statement in plpgsql is actually the main case I'm worried
about...

>> Maybe we should give up doing any CREATE/ALTER processing at all at
>> parse analysis time, and push it all to execution time.

> We'll still need something smaller to back patch, I think. :(

At this point I don't think we'll try to fix this in the back branches.
It's never really worked, so I don't see 8.2's behavior as a regression,
and I don't see a small fix that doesn't create issues of its own.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #3403: ver 8.2 can't add serial column to temp table,but 8.1 can
Next
From: Tom Lane
Date:
Subject: Re: BUG #3404: Mix ORDER BY ASC With DESC