From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | clodoaldo(dot)pinto(dot)neto(at)gmail(dot)com |
Cc: | PostgreSQL - General ML <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Changing the function used in an index. |
Date: | 2013-07-12 15:59:07 |
Message-ID: | 21420.1373644747@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Clodoaldo Neto <clodoaldo(dot)pinto(dot)neto(at)gmail(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2013-07-12 16:33:54 | Re: How can you get "WAL segment has already been removed" when doing synchronous replication ?! |
Previous Message | Bradley McCune | 2013-07-12 15:39:53 | Re: V8.4 TOAST table problem |