Re: [SQL] How To Create Temporary Table inside a function

2012-03-02 Thread Samuel Gendler
On Fri, Mar 2, 2012 at 3:49 AM, Philip Couling wrote: > Hi Rehan > > I suggest attempting to drop the table before you create the temp table: > DROP TABLE IF EXISTS table1; > > See: > http://www.postgresql.org/docs/current/static/sql-droptable.html > > > Also if you're using an actual TEMP table,

Re: [SQL] How To Create Temporary Table inside a function

2012-03-02 Thread Philip Couling
Hi Rehan I suggest attempting to drop the table before you create the temp table: DROP TABLE IF EXISTS table1; See: http://www.postgresql.org/docs/current/static/sql-droptable.html Also if you're using an actual TEMP table, PostgreSQL can automatically drop the table or just empty it once the t

[SQL] How To Create Temporary Table inside a function

2012-03-02 Thread Rehan Saleem
hi everyone , how can i create temp table say table1 with three column of types varchar , int and int, inside the function body and if that same table already exist it should drop that already existing table(table1) , and on every run this process should run. and how can i insert values from pos