Missing information on Expressional Indexes

Started by David Fetterabout 16 years ago2 messagesdocs
Jump to latest
#1David Fetter
david@fetter.org

Folks,

I think this page should mention that the expressions used in an
expressional index need to be equivalent to an IMMUTABLE function, and
the docs don't say so. The change should also be back-patched.
<http://www.postgresql.org/docs/current/static/indexes-expressional.html&gt;

I'm thinking that something along the lines of, "Expressions are
limited to those which are equivalent to an [link]IMMUTABLE[/link]
function."

Anybody have a better suggestion for wording?

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: David Fetter (#1)
Re: Missing information on Expressional Indexes

David Fetter <david@fetter.org> writes:

I think this page should mention that the expressions used in an
expressional index need to be equivalent to an IMMUTABLE function, and
the docs don't say so.

Sure they do, see CREATE INDEX:

All functions and operators used in an index definition must be
"immutable" ...

regards, tom lane