Re: [HACKERS] Delaying insertion of default values

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Delaying insertion of default values
Date: 1999-07-08 00:59:04
Message-ID: 199907080059.UAA18379@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> More generally, I wonder whether it is such a good idea for rules to be
> stored as parsetrees. For example, I can't drop and recreate a table
> mentioned in a rule attached to a different table, because the compiled
> rule includes the OIDs of the tables it references. So the compiled
> rule will start failing if I do that. (Right now, this causes a core
> dump :-( ... apparently someone is assuming that the OID in an RTE will
> never be bad ...)
>
> With rules stored as parsetrees, we need to be very careful about how
> much semantic knowledge gets factored into the parsetree before it is
> frozen as a rule. (This is another reason for pushing "optimization"
> transformations out of the parser and into modules downstream of the
> rule rewriter, BTW.)
>
> Comments? Storing rules as plain text would be too slow, perhaps,
> but would it help any to store rules as "raw" parsetrees that haven't
> yet gone through analyze.c?

All this sounds good, though we have so many TODO items, it seems a
little of a reach to be going after this. Seems like a good thing to do
as you add that extra phase of query processing.

--
Bruce Momjian | http://www.op.net/~candle
maillist(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

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-07-08 01:09:12 Re: [HACKERS] spinlock freeze again
Previous Message Bruce Momjian 1999-07-08 00:32:46 Re: [HACKERS] creating an index on numeric type