Thread: pgsql: Add record_image_ops opclass for matview concurrent refresh.

pgsql: Add record_image_ops opclass for matview concurrent refresh.

From
Kevin Grittner
Date:
Add record_image_ops opclass for matview concurrent refresh.

REFRESH MATERIALIZED VIEW CONCURRENTLY was broken for any matview
containing a column of a type without a default btree operator
class.  It also did not produce results consistent with a non-
concurrent REFRESH or a normal view if any column was of a type
which allowed user-visible differences between values which
compared as equal according to the type's default btree opclass.
Concurrent matview refresh was modified to use the new operators
to solve these problems.

Documentation was added for record comparison, both for the
default btree operator class for record, and the newly added
operators.  Regression tests now check for proper behavior both
for a matview with a box column and a matview containing a citext
column.

Reviewed by Steve Singer, who suggested some of the doc language.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f566515192461acd8d9c232f48ddac3fc965cfd8

Modified Files
--------------
contrib/citext/expected/citext.out       |   41 +++
contrib/citext/expected/citext_1.out     |   41 +++
contrib/citext/sql/citext.sql            |   23 ++
doc/src/sgml/func.sgml                   |  111 +++++--
src/backend/commands/matview.c           |   10 +-
src/backend/utils/adt/rowtypes.c         |  494 ++++++++++++++++++++++++++++++
src/include/catalog/catversion.h         |    2 +-
src/include/catalog/pg_amop.h            |   10 +
src/include/catalog/pg_amproc.h          |    1 +
src/include/catalog/pg_opclass.h         |    1 +
src/include/catalog/pg_operator.h        |   14 +
src/include/catalog/pg_opfamily.h        |    1 +
src/include/catalog/pg_proc.h            |   12 +-
src/include/utils/builtins.h             |    7 +
src/test/regress/expected/matview.out    |   22 +-
src/test/regress/expected/opr_sanity.out |    7 +-
src/test/regress/sql/matview.sql         |   15 +-
17 files changed, 775 insertions(+), 37 deletions(-)