Re: how to select temp table

From: Robert Gravsjö <robert(at)blogg(dot)se>
To: liuzg4 liuzg4 <liuzg4(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to select temp table
Date: 2009-05-06 17:59:04
Message-ID: 4A01CFE8.9010005@blogg.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-general

On 2009-05-06 14.34, liuzg4 liuzg4 wrote:
> ver 8.4
> i create two table with same name named 'testtable'
>
> one is temp table
>
>
>
> i select * from testtable
> then this table is a public or a temp ???

Temp. To access public use "select * from public.testtable".

"Temporary tables exist in a special schema, so a schema name cannot be
given when creating a temporary table."

See http://www.postgresql.org/docs/8.4/static/sql-createtable.html for
details.

/r

> drop table testtable
>
> then is this table a public or a temp? i test ,it drop temp table fisrst!
>
> so am i must show public or pg_temp_1 when i has two table with same name
> !!!
>

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Alvaro Herrera 2009-05-06 19:23:54 Re: how to select temp table
Previous Message liuzg4 liuzg4 2009-05-06 12:34:25 how to select temp table

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-05-06 19:23:54 Re: how to select temp table
Previous Message Andrej 2009-05-06 16:54:06 Re: prepared statements and DBD::Pg