Temporary and permanent tables with same name - Mailing list pgsql-general

From Vilson farias
Subject Temporary and permanent tables with same name
Date
Msg-id 002d01c2cd13$c5f3b0f0$98a0a8c0@dgtac
Whole thread Raw
Responses Re: Temporary and permanent tables with same name
Re: Temporary and permanent tables with same name
List pgsql-general
Greetings,
 
  I've been doing some temporary tables and I created one with the same name of a permanent table. Maybe you should avoid temporary tablem creation for this case.
 
Best regards.
 
 
bxs=# CREATE TABLE test (x INT4);
CREATE
bxs=# SELECT CAST('45 SECONDS' AS INTERVAL) INTO TEMP test;
SELECT
bxs=# SELECT * FROM test;
 ?column?
----------
 00:00:45
(1 row)
 
bxs=# \d test
          Table "test"
 Attribute |  Type   | Modifier
-----------+---------+----------
 x         | integer |
 
bxs=# INSERT INTO test VALUES (1);
ERROR:  Attribute '?column?' is of type 'interval' but expression is of type 'int4'
        You will need to rewrite or cast the expression
 
--------------------------------------------------------------------------------
José Vilson de Mello de Farias
Software Engineer
 
Dígitro Tecnologia Ltda - www.digitro.com.br
APC - Customer Oriented Applications
E-mail: vilson.farias@digitro.com.br
Tel.: +55 48 281 7158
ICQ 11866179

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: UPDATE slow
Next
From: roverr
Date:
Subject: Question: unique on multiple columns