Skip site navigation (1) Skip section navigation (2)

Re: Query Planner Issue - View and regexp_replace?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brandon Kane <brandonk98(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Query Planner Issue - View and regexp_replace?
Date: 2008-02-18 01:42:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Brandon Kane <brandonk98(at)yahoo(dot)com> writes:
> Yes, this turns out to be a volatile user-defined function.  Is there
> some specific part of the documentation you can point me to that helps
> explain why a volatile function might affect the plan for a column not
> involved in select or join operations?

I don't believe it's documented anywhere outside the source code, but
the short explanation is that the planner won't flatten the view for
fear of introducing extra evaluations of the volatile function.
(The fact that it isn't actually used at all doesn't help, because
we don't know that at the point where this decision has to be made.)

You could search the archives for the discussions leading to this patch:

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Nicholas HemleyDate: 2008-02-18 10:54:30
Subject: postgres 8.3 & ident authentication
Previous:From: Tom LaneDate: 2008-02-18 01:35:17
Subject: Re: pg_dump, pg_restore and template relationships

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group