Search Postgresql Archives

Re: Changing the function used in an index.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clodoaldo Neto <clodoaldo.pinto.neto@xxxxxxxxx> writes:
> How does the planner know that the function used in an index has changed?
> If the function's body is changed keeping the argument and return types the
> planner will not use it anymore:

Ordinarily, changing a function definition like that *would* break
things.  The only thing that's saving you from yourself in this example
is that the function is inline-able SQL, and so what the planner is
seeing is not "f(i)" vs "f(i)", but "i * -1" vs just "i".  Even so,
the index is broken/corrupt, or will be as soon as you make more
insertions into it with the changed function.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux