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