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

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

From
"Itzinger, Oskar"
Date:
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.

Why ???

Thanks.

/oskar



"Itzinger, Oskar" <oitzinger@opec.org> writes:
>   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.

\d and \di don't show temp tables and indexes.

The sequence object should be temp as well, but is not at the moment.

            regards, tom lane

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

From
Bruce Momjian
Date:
> 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.

You have found a good bug.  The code knows how to create TEMPORARY
tables and indexes, but not temporary sequences.  What is happening is
that the sequence created is not temporary and will not go away after
session termination.

I will work on fixing it.

The reason the table or index doesn't appear is because temporary stuff
doesn't appear in \d commands.

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