I have an strange problem . I am building an application with connection pooling. I had write a stored procedure and called from JDBC. In Procedure i am creating a table (temporary). I want to check if this temporary table already exists then do not create otherwise create it. The following query fails.
Select Into DBExistsFlag 1
Where Exists (Select * from Pg_Tables Where Upper(Trim(TableName)) = Upper(Trim(''FolderTree'')));
If Not Found Then
Create Temp Table FolderTree(FolderId Int8,ParentFolderId Int8,
FolderTyp Char(1),Leaf Int4,RightFlag Char(1));
If DBExistsFlag = 1 Then
Delete From FolderTree;
When I saw the table pgadmin_tables there was entry of table name pg_temp.232667.2 The columns of this table mached with my temporary table.
My question is that if postgres converts table name to this one then how can i find that temporary table already exists so that irritating mesasage should not come.
Any help/suggesion may be benificial for me.
NSTL New Delhi
pgsql-sql by date
|Next:||From: Valdir H. Dias Leite||Date: 2001-10-27 16:38:05|
|Previous:||From: Johnny Predicto||Date: 2001-10-27 07:29:27|
|Subject: PostgreSQL, Java & JDBC|
pgsql-general by date
|Next:||From: postgresql||Date: 2001-10-27 15:45:40|
|Subject: Re: Sequential sequence numbers|
|Previous:||From: Lincoln Yeoh||Date: 2001-10-27 11:01:33|
|Subject: Re: Disable Transaction - plans ?|