Matt Miller <mattm@epx.com> writes:
> On Wed, 2005-08-31 at 11:59 -0700, Josh Berkus wrote:
>> If a table does not exist, we don't want to check for that and bounce
>> the function; possibly the function will only be called in a context
>> where the table does exist.
> I am thankful that Oracle's PL/SQL compiler checks these things for me.
> I don't remember the last time I intended to write code that referenced
> something that did not exist in the database.
Almost every day, people try to write stuff like
CREATE TEMP TABLE foo ... ;INSERT INTO foo ... ;etc etcDROP TABLE foo ;
in plpgsql functions. Now I know that that doesn't work very well,
but we should be going in the direction of fixing it to work well,
not installing error checks that are guaranteed to make it fail.
regards, tom lane