Re: Alter Temporary table in Stored Procedure - Mailing list pgsql-general

From Nykolyn, Andrew
Subject Re: Alter Temporary table in Stored Procedure
Date
Msg-id F45D63E8C730D04F899B1227D5D03FD8C55336@XMBIL101.northgrum.com
Whole thread Raw
In response to Re: Alter Temporary table in Stored Procedure  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Alter Temporary table in Stored Procedure
List pgsql-general
> Does any know of a way that I can alter a temporary table by adding a
> serial column within a stored procedure after it has been created?

It should just work.  What did you try, exactly, and what error message
did you get?


I have the following code in my stored procedure:

    create temporary table t_resultset as select * from
get_createtempmsg();

    alter table t_resultset add column seq serial;

Where get_createtempmsg() is a stored procedure that returns a composite
type with no records.

The error I get is - relation "public.t_resultset"  does not exist.

I am using 8.1.3

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: expected just one rule action
Next
From: Dave Livesay
Date:
Subject: Re: ERROR: expected just one rule action