postgresql/contrib/pg_trgm
Tom Lane 0ef754cad7 Fix volatility markings of some contrib I/O functions.
In general, datatype I/O functions are supposed to be immutable or at
worst stable.  Some contrib I/O functions were, through oversight, not
marked with any volatility property at all, which made them VOLATILE.
Since (most of) these functions actually behave immutably, the erroneous
marking isn't terribly harmful; but it can be user-visible in certain
circumstances, as per a recent bug report from Joe Van Dyk in which a
cast to text was disallowed in an expression index definition.

To fix, just adjust the declarations in the extension SQL scripts.  If we
were being very fussy about this, we'd bump the extension version numbers,
but that seems like more trouble (for both developers and users) than the
problem is worth.

A fly in the ointment is that chkpass_in actually is volatile, because
of its use of random() to generate a fresh salt when presented with a
not-yet-encrypted password.  This is bad because of the general assumption
that I/O functions aren't volatile: the consequence is that records or
arrays containing chkpass elements may have input behavior a bit different
from a bare chkpass column.  But there seems no way to fix this without
breaking existing usage patterns for chkpass, and the consequences of the
inconsistency don't seem bad enough to justify that.  So for the moment,
just document it in a comment.

Since we're not bumping version numbers, there seems no harm in
back-patching these fixes; at least future installations will get the
functions marked correctly.
2014-11-05 11:34:22 -05:00
..
data trgm - Trigram matching for PostgreSQL 2004-05-31 17:18:12 +00:00
expected Fix contrib/pg_trgm's similarity() function for trigram-free strings. 2013-02-13 14:07:13 -05:00
sql Fix contrib/pg_trgm's similarity() function for trigram-free strings. 2013-02-13 14:07:13 -05:00
.gitignore Support "make check" in contrib 2011-04-25 22:27:11 +03:00
Makefile Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
pg_trgm--1.0.sql Fix volatility markings of some contrib I/O functions. 2014-11-05 11:34:22 -05:00
pg_trgm--unpackaged--1.0.sql Fix typos in some error messages thrown by extension scripts when fed to psql. 2014-08-25 18:30:48 +02:00
pg_trgm.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
trgm.h Remove many -Wcast-qual warnings 2011-09-11 21:54:32 +03:00
trgm_gin.c Remove unnecessary #include references, per pgrminclude script. 2011-09-01 10:04:27 -04:00
trgm_gist.c Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
trgm_op.c Fix possible buffer overrun in contrib/pg_trgm. 2014-01-13 13:07:17 -05:00