Temporary and permanent tables with same name

From: "Vilson farias" <vilson(dot)farias(at)digitro(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Temporary and permanent tables with same name
Date: 2003-02-05 12:40:31
Message-ID: 002d01c2cd13$c5f3b0f0$98a0a8c0@dgtac
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)farias(at)digitro(dot)com(dot)br
Tel.: +55 48 281 7158
ICQ 11866179

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martin Marques 2003-02-05 12:43:31 Re: 7.3.1 BREAKS COMPATIBILITY with the latest PHP4 (due to
Previous Message RobertD.Stewart 2003-02-05 12:26:55 Functions and triggers can anyone help