Thread: Re: [SQL] Possible Bug regarding temp tables (sql or psql?)

Re: [SQL] Possible Bug regarding temp tables (sql or psql?)

From
"Greg Sabino Mullane"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>> Any idea why the table can't be seen with \d in psql then?

> It is a known problem with temp tables.  They aren't visible with \d
> because they are invisible system tables that are removed on exit.  I
> think 7.3 will fix this.

FWIW, I have written a patch so it does work in psql for 7.3. If you have
a temporary table "foo" then '\d foo' will show the temporary table:
to see the non-temporary table you will have to specify the schema
as well with '\d schema.foo'. I'm still waiting on the current_schema()
function to be finished, but the patch is mostly done. I also wrote
an unfinished patch for 7.2 to display temp tables: if anyone has a
burning need to see temp tables in 7.2 let me know and I'll dust it
off and finish it.

Greg Sabino Mullane  greg@turnstep.com
PGP Key: 0x14964AC8 200207081038

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE9KaQNvJuQZxSWSsgRApskAJ9ch0C/Io0TXSy5JBXA3ts0Ve2enwCfaPNU
RQaPsHBQj3BVpearUvWKg+I=
=Ejgv
-----END PGP SIGNATURE-----