Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3bf3ab8

Browse files
committed
Add a materialized view relations.
A materialized view has a rule just like a view and a heap and other physical properties like a table. The rule is only used to populate the table, references in queries refer to the materialized data. This is a minimal implementation, but should still be useful in many cases. Currently data is only populated "on demand" by the CREATE MATERIALIZED VIEW and REFRESH MATERIALIZED VIEW statements. It is expected that future releases will add incremental updates with various timings, and that a more refined concept of defining what is "fresh" data will be developed. At some point it may even be possible to have queries use a materialized in place of references to underlying tables, but that requires the other above-mentioned features to be working first. Much of the documentation work by Robert Haas. Review by Noah Misch, Thom Brown, Robert Haas, Marko Tiikkaja Security review by KaiGai Kohei, with a decision on how best to implement sepgsql still pending.
1 parent b15a6da commit 3bf3ab8

File tree

103 files changed

+4240
-438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4240
-438
lines changed

contrib/oid2name/oid2name.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ sql_exec_dumpalltables(PGconn *conn, struct options * opts)
444444
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace "
445445
" LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),"
446446
" pg_catalog.pg_tablespace t "
447-
"WHERE relkind IN ('r'%s%s) AND "
447+
"WHERE relkind IN ('r', 'm'%s%s) AND "
448448
" %s"
449449
" t.oid = CASE"
450450
" WHEN reltablespace <> 0 THEN reltablespace"
@@ -515,7 +515,7 @@ sql_exec_searchtables(PGconn *conn, struct options * opts)
515515
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace \n"
516516
" LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),\n"
517517
" pg_catalog.pg_tablespace t \n"
518-
"WHERE relkind IN ('r', 'i', 'S', 't') AND \n"
518+
"WHERE relkind IN ('r', 'm', 'i', 'S', 't') AND \n"
519519
" t.oid = CASE\n"
520520
" WHEN reltablespace <> 0 THEN reltablespace\n"
521521
" ELSE dattablespace\n"

contrib/pg_upgrade/info.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
282282
"CREATE TEMPORARY TABLE info_rels (reloid) AS SELECT c.oid "
283283
"FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n "
284284
" ON c.relnamespace = n.oid "
285-
"WHERE relkind IN ('r', 'i'%s) AND "
285+
"WHERE relkind IN ('r', 'm', 'i'%s) AND "
286286
/* exclude possible orphaned temp tables */
287287
" ((n.nspname !~ '^pg_temp_' AND "
288288
" n.nspname !~ '^pg_toast_temp_' AND "

contrib/pg_upgrade/pg_upgrade.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ set_frozenxids(void)
525525
PQclear(executeQueryOrDie(conn,
526526
"UPDATE pg_catalog.pg_class "
527527
"SET relfrozenxid = '%u' "
528-
/* only heap and TOAST are vacuumed */
529-
"WHERE relkind IN ('r', 't')",
528+
/* only heap, materialized view, and TOAST are vacuumed */
529+
"WHERE relkind IN ('r', 'm', 't')",
530530
old_cluster.controldata.chkpnt_nxtxid));
531531
PQfinish(conn);
532532

contrib/pg_upgrade/version_old_8_3.c

+3
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ old_8_3_check_for_tsquery_usage(ClusterInfo *cluster)
145145
"FROM pg_catalog.pg_class c, "
146146
" pg_catalog.pg_namespace n, "
147147
" pg_catalog.pg_attribute a "
148+
/* materialized views didn't exist in 8.3, so no need to check 'm' */
148149
"WHERE c.relkind = 'r' AND "
149150
" c.oid = a.attrelid AND "
150151
" NOT a.attisdropped AND "
@@ -323,6 +324,7 @@ old_8_3_rebuild_tsvector_tables(ClusterInfo *cluster, bool check_mode)
323324
"FROM pg_catalog.pg_class c, "
324325
" pg_catalog.pg_namespace n, "
325326
" pg_catalog.pg_attribute a "
327+
/* materialized views didn't exist in 8.3, so no need to check 'm' */
326328
"WHERE c.relkind = 'r' AND "
327329
" c.oid = a.attrelid AND "
328330
" NOT a.attisdropped AND "
@@ -343,6 +345,7 @@ old_8_3_rebuild_tsvector_tables(ClusterInfo *cluster, bool check_mode)
343345
"FROM pg_catalog.pg_class c, " \
344346
" pg_catalog.pg_namespace n, " \
345347
" pg_catalog.pg_attribute a " \
348+
/* materialized views didn't exist in 8.3, so no need to check 'm' */ \
346349
"WHERE c.relkind = 'r' AND " \
347350
" c.oid = a.attrelid AND " \
348351
" NOT a.attisdropped AND " \

contrib/pgstattuple/pgstattuple.c

+1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ pgstat_relation(Relation rel, FunctionCallInfo fcinfo)
216216
switch (rel->rd_rel->relkind)
217217
{
218218
case RELKIND_RELATION:
219+
case RELKIND_MATVIEW:
219220
case RELKIND_TOASTVALUE:
220221
case RELKIND_SEQUENCE:
221222
return pgstat_heap(rel, fcinfo);

contrib/vacuumlo/vacuumlo.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ vacuumlo(const char *database, const struct _param * param)
209209
strcat(buf, " AND a.atttypid = t.oid ");
210210
strcat(buf, " AND c.relnamespace = s.oid ");
211211
strcat(buf, " AND t.typname in ('oid', 'lo') ");
212-
strcat(buf, " AND c.relkind = 'r'");
212+
strcat(buf, " AND c.relkind in ('r', 'm')");
213213
strcat(buf, " AND s.nspname !~ '^pg_'");
214214
res = PQexec(conn, buf);
215215
if (PQresultStatus(res) != PGRES_TUPLES_OK)

doc/src/sgml/catalogs.sgml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1597,8 +1597,8 @@
15971597
The catalog <structname>pg_class</structname> catalogs tables and most
15981598
everything else that has columns or is otherwise similar to a
15991599
table. This includes indexes (but see also
1600-
<structname>pg_index</structname>), sequences, views, composite types,
1601-
and TOAST tables; see <structfield>relkind</>.
1600+
<structname>pg_index</structname>), sequences, views, materialized
1601+
views, composite types, and TOAST tables; see <structfield>relkind</>.
16021602
Below, when we mean all of these
16031603
kinds of objects we speak of <quote>relations</quote>. Not all
16041604
columns are meaningful for all relation types.
@@ -1789,8 +1789,9 @@
17891789
<entry></entry>
17901790
<entry>
17911791
<literal>r</> = ordinary table, <literal>i</> = index,
1792-
<literal>S</> = sequence, <literal>v</> = view, <literal>c</> =
1793-
composite type, <literal>t</> = TOAST table,
1792+
<literal>S</> = sequence, <literal>v</> = view,
1793+
<literal>m</> = materialized view,
1794+
<literal>c</> = composite type, <literal>t</> = TOAST table,
17941795
<literal>f</> = foreign table
17951796
</entry>
17961797
</row>

doc/src/sgml/func.sgml

+16-7
Original file line numberDiff line numberDiff line change
@@ -13743,6 +13743,10 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1374313743
<primary>pg_tablespace_location</primary>
1374413744
</indexterm>
1374513745

13746+
<indexterm>
13747+
<primary>pg_relation_is_scannable</primary>
13748+
</indexterm>
13749+
1374613750
<indexterm>
1374713751
<primary>pg_typeof</primary>
1374813752
</indexterm>
@@ -13867,29 +13871,29 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1386713871
<row>
1386813872
<entry><literal><function>pg_get_viewdef(<parameter>view_name</parameter>)</function></literal></entry>
1386913873
<entry><type>text</type></entry>
13870-
<entry>get underlying <command>SELECT</command> command for view (<emphasis>deprecated</emphasis>)</entry>
13874+
<entry>get underlying <command>SELECT</command> command for view or materialized view (<emphasis>deprecated</emphasis>)</entry>
1387113875
</row>
1387213876
<row>
1387313877
<entry><literal><function>pg_get_viewdef(<parameter>view_name</parameter>, <parameter>pretty_bool</>)</function></literal></entry>
1387413878
<entry><type>text</type></entry>
13875-
<entry>get underlying <command>SELECT</command> command for view (<emphasis>deprecated</emphasis>)</entry>
13879+
<entry>get underlying <command>SELECT</command> command for view or materialized view (<emphasis>deprecated</emphasis>)</entry>
1387613880
</row>
1387713881
<row>
1387813882
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>)</function></literal></entry>
1387913883
<entry><type>text</type></entry>
13880-
<entry>get underlying <command>SELECT</command> command for view</entry>
13884+
<entry>get underlying <command>SELECT</command> command for view or materialized view</entry>
1388113885
</row>
1388213886
<row>
1388313887
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>pretty_bool</>)</function></literal></entry>
1388413888
<entry><type>text</type></entry>
13885-
<entry>get underlying <command>SELECT</command> command for view</entry>
13889+
<entry>get underlying <command>SELECT</command> command for view or materialized view</entry>
1388613890
</row>
1388713891
<row>
1388813892
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>wrap_column_int</>)</function></literal></entry>
1388913893
<entry><type>text</type></entry>
13890-
<entry>get underlying <command>SELECT</command> command for view;
13891-
lines with fields are wrapped to specified number of columns,
13892-
pretty-printing is implied</entry>
13894+
<entry>get underlying <command>SELECT</command> command for view or
13895+
materialized view; lines with fields are wrapped to specified
13896+
number of columns, pretty-printing is implied</entry>
1389313897
</row>
1389413898
<row>
1389513899
<entry><literal><function>pg_options_to_table(<parameter>reloptions</parameter>)</function></literal></entry>
@@ -13906,6 +13910,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1390613910
<entry><type>text</type></entry>
1390713911
<entry>get the path in the file system that this tablespace is located in</entry>
1390813912
</row>
13913+
<row>
13914+
<entry><literal><function>pg_relation_is_scannable(<parameter>relation_oid</parameter>)</function></literal></entry>
13915+
<entry><type>boolean</type></entry>
13916+
<entry>is the relation scannable; a materialized view which has not been loaded will not be scannable</entry>
13917+
</row>
1390913918
<row>
1391013919
<entry><literal><function>pg_typeof(<parameter>any</parameter>)</function></literal></entry>
1391113920
<entry><type>regtype</type></entry>

doc/src/sgml/ref/allfiles.sgml

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Complete list of usable sgml source files in this directory.
2121
<!ENTITY alterIndex SYSTEM "alter_index.sgml">
2222
<!ENTITY alterLanguage SYSTEM "alter_language.sgml">
2323
<!ENTITY alterLargeObject SYSTEM "alter_large_object.sgml">
24+
<!ENTITY alterMaterializedView SYSTEM "alter_materialized_view.sgml">
2425
<!ENTITY alterOperator SYSTEM "alter_operator.sgml">
2526
<!ENTITY alterOperatorClass SYSTEM "alter_opclass.sgml">
2627
<!ENTITY alterOperatorFamily SYSTEM "alter_opfamily.sgml">
@@ -63,6 +64,7 @@ Complete list of usable sgml source files in this directory.
6364
<!ENTITY createGroup SYSTEM "create_group.sgml">
6465
<!ENTITY createIndex SYSTEM "create_index.sgml">
6566
<!ENTITY createLanguage SYSTEM "create_language.sgml">
67+
<!ENTITY createMaterializedView SYSTEM "create_materialized_view.sgml">
6668
<!ENTITY createOperator SYSTEM "create_operator.sgml">
6769
<!ENTITY createOperatorClass SYSTEM "create_opclass.sgml">
6870
<!ENTITY createOperatorFamily SYSTEM "create_opfamily.sgml">
@@ -102,6 +104,7 @@ Complete list of usable sgml source files in this directory.
102104
<!ENTITY dropGroup SYSTEM "drop_group.sgml">
103105
<!ENTITY dropIndex SYSTEM "drop_index.sgml">
104106
<!ENTITY dropLanguage SYSTEM "drop_language.sgml">
107+
<!ENTITY dropMaterializedView SYSTEM "drop_materialized_view.sgml">
105108
<!ENTITY dropOperator SYSTEM "drop_operator.sgml">
106109
<!ENTITY dropOperatorClass SYSTEM "drop_opclass.sgml">
107110
<!ENTITY dropOperatorFamily SYSTEM "drop_opfamily.sgml">
@@ -136,6 +139,7 @@ Complete list of usable sgml source files in this directory.
136139
<!ENTITY prepare SYSTEM "prepare.sgml">
137140
<!ENTITY prepareTransaction SYSTEM "prepare_transaction.sgml">
138141
<!ENTITY reassignOwned SYSTEM "reassign_owned.sgml">
142+
<!ENTITY refreshMaterializedView SYSTEM "refresh_materialized_view.sgml">
139143
<!ENTITY reindex SYSTEM "reindex.sgml">
140144
<!ENTITY releaseSavepoint SYSTEM "release_savepoint.sgml">
141145
<!ENTITY reset SYSTEM "reset.sgml">

doc/src/sgml/ref/alter_extension.sgml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ALTER EXTENSION <replaceable class="PARAMETER">name</replaceable> DROP <replacea
3939
FOREIGN DATA WRAPPER <replaceable class="PARAMETER">object_name</replaceable> |
4040
FOREIGN TABLE <replaceable class="PARAMETER">object_name</replaceable> |
4141
FUNCTION <replaceable class="PARAMETER">function_name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) |
42+
MATERIALIZED VIEW <replaceable class="PARAMETER">object_name</replaceable> |
4243
OPERATOR <replaceable class="PARAMETER">operator_name</replaceable> (<replaceable class="PARAMETER">left_type</replaceable>, <replaceable class="PARAMETER">right_type</replaceable>) |
4344
OPERATOR CLASS <replaceable class="PARAMETER">object_name</replaceable> USING <replaceable class="parameter">index_method</replaceable> |
4445
OPERATOR FAMILY <replaceable class="PARAMETER">object_name</replaceable> USING <replaceable class="parameter">index_method</replaceable> |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
<!--
2+
doc/src/sgml/ref/alter_materialized_view.sgml
3+
PostgreSQL documentation
4+
-->
5+
6+
<refentry id="SQL-ALTERMATERIALIZEDVIEW">
7+
<refmeta>
8+
<refentrytitle>ALTER MATERIALIZED VIEW</refentrytitle>
9+
<manvolnum>7</manvolnum>
10+
<refmiscinfo>SQL - Language Statements</refmiscinfo>
11+
</refmeta>
12+
13+
<refnamediv>
14+
<refname>ALTER MATERIALIZED VIEW</refname>
15+
<refpurpose>change the definition of a materialized view</refpurpose>
16+
</refnamediv>
17+
18+
<indexterm zone="sql-alterview">
19+
<primary>ALTER MATERIALIZED VIEW</primary>
20+
</indexterm>
21+
22+
<refsynopsisdiv>
23+
<synopsis>
24+
ALTER MATERIALIZED VIEW [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable>
25+
<replaceable class="PARAMETER">action</replaceable> [, ... ]
26+
ALTER MATERIALIZED VIEW [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable>
27+
RENAME [ COLUMN ] <replaceable class="PARAMETER">column_name</replaceable> TO <replaceable class="PARAMETER">new_column_name</replaceable>
28+
ALTER MATERIALIZED VIEW [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
29+
RENAME TO <replaceable class="parameter">new_name</replaceable>
30+
ALTER MATERIALIZED VIEW [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
31+
SET SCHEMA <replaceable class="parameter">new_schema</replaceable>
32+
33+
<phrase>where <replaceable class="PARAMETER">action</replaceable> is one of:</phrase>
34+
35+
ALTER [ COLUMN ] <replaceable class="PARAMETER">column_name</replaceable> SET STATISTICS <replaceable class="PARAMETER">integer</replaceable>
36+
ALTER [ COLUMN ] <replaceable class="PARAMETER">column_name</replaceable> SET ( <replaceable class="PARAMETER">attribute_option</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] )
37+
ALTER [ COLUMN ] <replaceable class="PARAMETER">column_name</replaceable> RESET ( <replaceable class="PARAMETER">attribute_option</replaceable> [, ... ] )
38+
ALTER [ COLUMN ] <replaceable class="PARAMETER">column_name</replaceable> SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
39+
CLUSTER ON <replaceable class="PARAMETER">index_name</replaceable>
40+
SET WITHOUT CLUSTER
41+
SET ( <replaceable class="PARAMETER">storage_parameter</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] )
42+
RESET ( <replaceable class="PARAMETER">storage_parameter</replaceable> [, ... ] )
43+
OWNER TO <replaceable class="PARAMETER">new_owner</replaceable>
44+
SET TABLESPACE <replaceable class="PARAMETER">new_tablespace</replaceable>
45+
</synopsis>
46+
</refsynopsisdiv>
47+
48+
<refsect1>
49+
<title>Description</title>
50+
51+
<para>
52+
<command>ALTER MATERIALIZED VIEW</command> changes various auxiliary
53+
properties of an existing materialized view.
54+
</para>
55+
56+
<para>
57+
You must own the materialized view to use <command>ALTER MATERIALIZED
58+
VIEW</>. To change a materialized view's schema, you must also have
59+
<literal>CREATE</> privilege on the new schema.
60+
To alter the owner, you must also be a direct or indirect member of the new
61+
owning role, and that role must have <literal>CREATE</literal> privilege on
62+
the materialized view's schema. (These restrictions enforce that altering
63+
the owner doesn't do anything you couldn't do by dropping and recreating the
64+
materialized view. However, a superuser can alter ownership of any view
65+
anyway.)
66+
</para>
67+
68+
<para>
69+
The statement subforms and actions available for
70+
<command>ALTER MATERIALIZED VIEW</command> are a subset of those available
71+
for <command>ALTER TABLE</command>, and have the same meaning when used for
72+
materialized views. See the descriptions for <xref linkend="sql-altertable">
73+
for details.
74+
</para>
75+
</refsect1>
76+
77+
<refsect1>
78+
<title>Parameters</title>
79+
80+
<variablelist>
81+
82+
<varlistentry>
83+
<term><replaceable class="parameter">name</replaceable></term>
84+
<listitem>
85+
<para>
86+
The name (optionally schema-qualified) of an existing materialized view.
87+
</para>
88+
</listitem>
89+
</varlistentry>
90+
91+
<varlistentry>
92+
<term><replaceable class="PARAMETER">column_name</replaceable></term>
93+
<listitem>
94+
<para>
95+
Name of a new or existing column.
96+
</para>
97+
</listitem>
98+
</varlistentry>
99+
100+
<varlistentry>
101+
<term><replaceable class="PARAMETER">new_column_name</replaceable></term>
102+
<listitem>
103+
<para>
104+
New name for an existing column.
105+
</para>
106+
</listitem>
107+
</varlistentry>
108+
109+
<varlistentry>
110+
<term><replaceable class="PARAMETER">new_owner</replaceable></term>
111+
<listitem>
112+
<para>
113+
The user name of the new owner of the materialized view.
114+
</para>
115+
</listitem>
116+
</varlistentry>
117+
118+
<varlistentry>
119+
<term><replaceable class="parameter">new_name</replaceable></term>
120+
<listitem>
121+
<para>
122+
The new name for the materialized view.
123+
</para>
124+
</listitem>
125+
</varlistentry>
126+
127+
<varlistentry>
128+
<term><replaceable class="parameter">new_schema</replaceable></term>
129+
<listitem>
130+
<para>
131+
The new schema for the materialized view.
132+
</para>
133+
</listitem>
134+
</varlistentry>
135+
</variablelist>
136+
</refsect1>
137+
138+
<refsect1>
139+
<title>Examples</title>
140+
141+
<para>
142+
To rename the materialized view <literal>foo</literal> to
143+
<literal>bar</literal>:
144+
<programlisting>
145+
ALTER MATERIALIZED VIEW foo RENAME TO bar;
146+
</programlisting></para>
147+
</refsect1>
148+
149+
<refsect1>
150+
<title>Compatibility</title>
151+
152+
<para>
153+
<command>ALTER MATERIALIZED VIEW</command> is a
154+
<productname>PostgreSQL</productname> extension.
155+
</para>
156+
</refsect1>
157+
158+
<refsect1>
159+
<title>See Also</title>
160+
161+
<simplelist type="inline">
162+
<member><xref linkend="sql-creatematerializedview"></member>
163+
<member><xref linkend="sql-dropmaterializedview"></member>
164+
<member><xref linkend="sql-refreshmaterializedview"></member>
165+
</simplelist>
166+
</refsect1>
167+
</refentry>

doc/src/sgml/ref/comment.sgml

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ COMMENT ON
3838
FUNCTION <replaceable class="PARAMETER">function_name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) |
3939
INDEX <replaceable class="PARAMETER">object_name</replaceable> |
4040
LARGE OBJECT <replaceable class="PARAMETER">large_object_oid</replaceable> |
41+
MATERIALIZED VIEW <replaceable class="PARAMETER">object_name</replaceable> |
4142
OPERATOR <replaceable class="PARAMETER">operator_name</replaceable> (<replaceable class="PARAMETER">left_type</replaceable>, <replaceable class="PARAMETER">right_type</replaceable>) |
4243
OPERATOR CLASS <replaceable class="PARAMETER">object_name</replaceable> USING <replaceable class="parameter">index_method</replaceable> |
4344
OPERATOR FAMILY <replaceable class="PARAMETER">object_name</replaceable> USING <replaceable class="parameter">index_method</replaceable> |
@@ -279,6 +280,7 @@ COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral';
279280
COMMENT ON INDEX my_index IS 'Enforces uniqueness on employee ID';
280281
COMMENT ON LANGUAGE plpython IS 'Python support for stored procedures';
281282
COMMENT ON LARGE OBJECT 346344 IS 'Planning document';
283+
COMMENT ON MATERIALIZED VIEW my_matview IS 'Summary of order history';
282284
COMMENT ON OPERATOR ^ (text, text) IS 'Performs intersection of two texts';
283285
COMMENT ON OPERATOR - (NONE, integer) IS 'Unary minus';
284286
COMMENT ON OPERATOR CLASS int4ops USING btree IS '4 byte integer operators for btrees';

doc/src/sgml/ref/create_index.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ <replaceable class="parameter">name</
3333
<title>Description</title>
3434

3535
<para>
36-
<command>CREATE INDEX</command> constructs an index
37-
on the specified column(s) of the specified table.
36+
<command>CREATE INDEX</command> constructs an index on the specified column(s)
37+
of the specified relation, which can be a table or a materialized view.
3838
Indexes are primarily used to enhance database performance (though
3939
inappropriate use can result in slower performance).
4040
</para>

0 commit comments

Comments
 (0)