Re: [HACKERS] Early evaluation of constant expresions (with PATCH)

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: Bernard Frankpitt <frankpit(at)pop(dot)dn(dot)net>, pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Early evaluation of constant expresions (with PATCH)
Date: 1999-09-22 02:17:29
Message-ID: 199909220217.WAA23935@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Bernard Frankpitt <frankpit(at)pop(dot)dn(dot)net> writes:
> > The solution that I propose is to include code in the optimizer that
> > picks functions with constant arguments out of a qualification
> > clause, and evaluates them.
>
> This is something I had on my own to-do list, and I'm glad to see
> someone beat me to it. But you've only done half the job: you
> should also be folding operators with constant arguments.
>
> Also, you need to be wary of functions like now() and random().
> There probably isn't any other way to handle these than to add a
> column to pg_proc flagging functions that can't be constant-folded.

Already there, pg_proc.proiscachable.

--
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 Tatsuo Ishii 1999-09-22 04:49:09 Re: [HACKERS] postmaster disappears
Previous Message Tom Lane 1999-09-22 01:34:35 Re: [HACKERS] Early evaluation of constant expresions (with PATCH)