Re: [HACKERS] CREATE TEMP TABLE

Started by Bruce Momjianover 26 years ago3 messages
#1Bruce Momjian
maillist@candle.pha.pa.us

SQL92 uses TEMPORARY instead, I think it would be
interesting to keep compatibility with SQL Standard.
CREATE [{ GLOBAL | LOCAL } TEMPORARY ] TABLE class_name

Bruce, is this OK? If so, I'll put it in (if someone else hasn't
already done so).

We only support LOCAL, I think, because the visibility of the table is
only local.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@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
#2Thomas Lockhart
lockhart@alumni.caltech.edu
In reply to: Bruce Momjian (#1)

SQL92 uses TEMPORARY instead, I think it would be
interesting to keep compatibility with SQL Standard.
CREATE [{ GLOBAL | LOCAL } TEMPORARY ] TABLE class_name

Bruce, is this OK? If so, I'll put it in (if someone else hasn't
already done so).

We only support LOCAL, I think, because the visibility of the table is
only local.

OK. I've got patches to include the LOCAL/GLOBAL syntax, and an elog
error if GLOBAL is specified. Will apply soon...

- Tom

--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California

#3Thomas Lockhart
lockhart@alumni.caltech.edu
In reply to: Thomas Lockhart (#2)

CREATE [{ GLOBAL | LOCAL } TEMPORARY ] TABLE class_name

postgres=> create local temporary table tt (i int);
CREATE
postgres=> create global temporary table tg (i int);
ERROR: GLOBAL TEMPORARY TABLE is not currently supported
postgres=> create temporary table tn (i int);
CREATE

I just adjusted the source tree to include this, along with internal
changes to integrate Vadim's transaction level and locking syntax.
This will probably require a full "make clean install" since some
keywords were added.

- Tom

--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California