Temporary and permanent tables with same name

Поиск
Список
Период
Сортировка
От Vilson farias
Тема Temporary and permanent tables with same name
Дата
Msg-id 002d01c2cd13$c5f3b0f0$98a0a8c0@dgtac
обсуждение исходный текст
Ответы Re: Temporary and permanent tables with same name  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Temporary and permanent tables with same name  (Curt Sampson <cjs@cynic.net>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: UPDATE slow
Следующее
От: roverr
Дата:
Сообщение: Question: unique on multiple columns