| From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | regclass, \d command and temp tables |
| Date: | 2010-08-09 15:10:14 |
| Message-ID: | 20100810.001014.95808425.t-ishii@sraoss.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
I have created regular table t1 and temp table t1. Regclass and \d
command do not seem to distinguish them. Is this normal?
test=# create table t1(i int);
CREATE TABLE
test=# select 't1'::regclass::oid;
oid
---------
1470776
(1 row)
test=# create temp table t1(i int, j int);
CREATE TABLE
test=# select 't1'::regclass::oid;
oid
---------
1470776 <-- why same oid?
(1 row)
test=# \d t1 <-- \d finds regular table, not temporary table?
Table "public.t1"
Column | Type | Modifiers
--------+---------+-----------
i | integer |
test=# insert into t1 values(1,2); <-- insert command works as expected of course.
INSERT 0 1
test=# select * from t1;
i | j
---+---
1 | 2
(1 row)
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2010-08-09 15:11:04 | Re: dynamically allocating chunks from shared memory |
| Previous Message | Pavel Stehule | 2010-08-09 15:06:19 | Re: is syntax columname(tablename) necessary still? |