Re: [HACKERS] TEMP table code - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] TEMP table code
Date
Msg-id 199901290643.BAA06638@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] TEMP table code  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
List pgsql-hackers
> > The basic question is whether this is the proper way to do temp 
> > tables.
> 
> I haven't looked at the patches, but fwiw I would have tried it about
> the same way. No need to touch pg_class if the info is
> session-specific...

Yes, my feeling is that the code is complicated enough without having
the temp table stuff adding complexity.  What I did is that a cache
lookup returns a fake pg_class tuple.  The only code changes are a few
function calls in the cache routines to insert my fake tuples, and some
code in the heap_create_with_catalog/heap_create/heap_destroy code to
create temp tables with unique names.  A new istemp flag in a few
structuers.  The rest of the code is untouched.


--  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,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: [HACKERS] Postmaster dies with many child processes (spinlock/semget failed)
Next
From: Vadim Mikheev
Date:
Subject: equal: don't know whether nodes of type 600 are equal