| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: ALTER TYPE 3: add facility to identify further no-work cases |
| Date: | 2011-01-26 21:02:53 |
| Message-ID: | 25440.1296075773@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Jan 26, 2011 at 3:08 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> It's not obvious to me that it has a use case outside of casts, but
>>> it's certainly possible I'm missing something.
>> A possible example is simplifying X + 0 to X, or X * 0 to 0.
> Oh, I see. The times I've seen an issue with those kinds of
> expressions have always been related to selectivity estimation.
Yeah, helping the planner recognize equivalent cases is at least as
large a reason for wanting this as any direct savings of execution time.
I don't mind confining the feature to casts to start with, but it might
be a good idea to specify the check-function API in a way that would let
it be plugged into a more generally available call-simplification hook
later.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dimitri Fontaine | 2011-01-26 21:03:07 | Re: Extensions support for pg_dump, patch v27 |
| Previous Message | Robert Haas | 2011-01-26 20:58:52 | Re: [COMMITTERS] pgsql: Remove arbitrary ALTER TABLE .. ADD COLUMN restriction. |