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

Re: Index Ignored Due To Use Of View

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Donald Fraser" <postgres(at)kiwi-fraser(dot)net>
Cc: "[BUGS]" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Index Ignored Due To Use Of View
Date: 2011-03-24 00:07:53
Message-ID: 8297.1300925273@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Donald Fraser" <postgres(at)kiwi-fraser(dot)net> writes:
> I found the solution to the problem and it would therefore appear as though this is not a bug!
> If I change the function definition to be "STABLE" instead of "VOLATILE", then the problem goes away.

Yeah, that's intentional.  If the planner flattens a view that has a
function in its output list, things get a lot less predictable about
when the function will be called.  For a volatile function, that can
matter a lot.  We used to flatten such views anyway, but we got enough
complaints that we changed it.

http://archives.postgresql.org/pgsql-committers/2006-08/msg00358.php

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Nathan M. DavalosDate: 2011-03-24 00:33:36
Subject: Re: BUG #5944: COPY FROM doesn't work with international characters
Previous:From: John R PierceDate: 2011-03-23 23:49:03
Subject: Re: BUG #5944: COPY FROM doesn't work with international characters

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