Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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

In response to

Responses

pgsql-patches by date

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

pgsql-general by date

Next:From: Tom LaneDate: 2001-06-22 23:13:09
Subject: Re: Multiple Indexing, performance impact
Previous:From: Bruce MomjianDate: 2001-06-22 22:22:48
Subject: Re: Multiple Indexing, performance impact

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group