Re: [GENERAL] [Help] Temporary Table: Implicitely created index not shown in \d i

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Itzinger, Oskar" <oitzinger(at)opec(dot)org>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [GENERAL] [Help] Temporary Table: Implicitely created index not shown in \d i
Date: 2001-06-22 23:04:19
Message-ID: 200106222304.f5MN4Ja05624@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

> Hi,
>
> I'm running v7.1.2. In psql, if I
>
> CREATE TEMPORARY TABLE junk (col1 SERIAL, <more cols>)
>
> and check \ds, the implicitely created sequence is shown but \di doesn't
> show
> the implicitely created index.

OK, here is a patch that fixes it so the sequence is temporary like
everything else. It also adds CREATE TEMPORARY SEQUENCE to the syntax.

test=> create temp table kkk(x serial);
NOTICE: CREATE TABLE will create implicit sequence 'kkk_x_seq' for
SERIAL column 'kkk.x'
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'kkk_x_key' for
table 'kkk'
CREATE
test=> \d
No relations found.
test=> \di
No relations found.
test=> \dS
List of relations
Name | Type | Owner
----------------+----------+----------
...
pg_temp_5396_0 | sequence | postgres
pg_temp_5396_1 | table | postgres

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 5.8 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-06-22 23:13:09 Re: Multiple Indexing, performance impact
Previous Message Bruce Momjian 2001-06-22 22:22:48 Re: Multiple Indexing, performance impact

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2001-06-22 23:17:40 Re: Re: [GENERAL] [Help] Temporary Table: Implicitely created index not shown in \d i
Previous Message Jason Tishler 2001-06-22 21:28:03 Re: Python (PyGreSQL) make install patch