Skip site navigation (1) Skip section navigation (2)

Re: Are temp table really invisible for existing table

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rahul_g(at)ip(dot)eth(dot)net, pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: Are temp table really invisible for existing table
Date: 2001-08-03 16:19:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
This is the way it is supposed to work, I think.  You can layer a temp
on top of a real, but not a real on top of a temp.

> Rahul Gade (Rahul_g(at)ip(dot)eth(dot)net) reports a bug with a severity of 3
> The lower the number the more severe it is.
> Short Description
> Are temp table really invisible for existing table
> Long Description
> Ok !!
>   I know creating the temp table with the name of existing table don't create any problem.
>  but, when i try to create a new table (not temp) with the same name as that of name of temporary table recently created it gives me message as "the table already exists"
> try this :
> create temp table table1(idd int);
> create table table1(idd int);
> should it be happened ?
> ----------------------------------------------
> Please help me in solving one problem :
>  my one function is creating or not creating a temp table based on condition. How the same function will recognise that the temp table with this name already exists(or created by previous execution of the same function), since the same procedure is executed in many times in a single connection session.
>   I don't want to close my connection, because it's not feasible for my application.
> *  Is there any function to check the existance of temporary table,
> *  is there any function which would check that the table exists or not without firing the message of "table does not exists"
> Thanks for quick response in advance
> Sample Code
> No file was uploaded with this report
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-bugs by date

Next:From: Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=Date: 2001-08-03 20:23:33
Subject: Re: HELP! BUG? pg_dump mucks up grant/revoke
Previous:From: Tom LaneDate: 2001-08-03 14:47:38
Subject: Re: Are temp table really invisible for existing table

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group